sKunKbad Posted October 25, 2009 Share Posted October 25, 2009 I'd like to round up to a 49 or 99 cent value. 1.84 would become 1.99 2.1 would become 2.49 3.0 would become 3.49 etc I've seen round(), but not going to work. Any ideas for me? Link to comment https://forums.phpfreaks.com/topic/178902-round-up-to-x99/ Share on other sites More sharing options...
sKunKbad Posted October 25, 2009 Author Share Posted October 25, 2009 I figured it out: $retail_cost = ( ( ceil ( $cost / .5 ) ) * .5 ) - .01; Link to comment https://forums.phpfreaks.com/topic/178902-round-up-to-x99/#findComment-943820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.