son.of.the.morning Posted September 10, 2010 Share Posted September 10, 2010 i want to display the size of a file but i round it off to the nearest kb. I am using... ($_FILES["file"]["size"]/1024/1024)."mb" i am geting it return something like this.... 1.0313243865967mb and i want it to be more like 1.03mb any idears??? Link to comment https://forums.phpfreaks.com/topic/213048-displaying-the-size-of-a-file/ Share on other sites More sharing options...
Zane Posted September 10, 2010 Share Posted September 10, 2010 round() to the nearest tenth. round(3.141592654, 2) == 3.14 Link to comment https://forums.phpfreaks.com/topic/213048-displaying-the-size-of-a-file/#findComment-1109544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.