jkkenzie Posted May 9, 2008 Share Posted May 9, 2008 How do i make sure that a figure is two decimal place i.e i am calculating some figures that would result to alot of decimal places e.g 123.0089354. I want to make sure that the value 123.0089354 is rounded up to eqaul 123.01 i.e two decimal place. Regards, Joe Link to comment https://forums.phpfreaks.com/topic/104837-trim-a-variable-value-to-2-decimal-place/ Share on other sites More sharing options...
pabtyf Posted May 9, 2008 Share Posted May 9, 2008 try: number_format(123.0089354,2,".",""); Link to comment https://forums.phpfreaks.com/topic/104837-trim-a-variable-value-to-2-decimal-place/#findComment-536598 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.