hungryOrb Posted October 10, 2007 Share Posted October 10, 2007 So I have a long number. Does anyone know how to easily round it down to 2 decimal places? 4.56794821 for example :] Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/72585-solved-numerical-string-formats/ Share on other sites More sharing options...
Barand Posted October 10, 2007 Share Posted October 10, 2007 Any of these http://www.php.net/round http://www.php.net/number_format http://www.php.net/sprintf http://www.php.net/printf Quote Link to comment https://forums.phpfreaks.com/topic/72585-solved-numerical-string-formats/#findComment-366041 Share on other sites More sharing options...
hungryOrb Posted October 10, 2007 Author Share Posted October 10, 2007 Thankyou Barand! /hump Quote Link to comment https://forums.phpfreaks.com/topic/72585-solved-numerical-string-formats/#findComment-366103 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.