Let's say the number is 0.555555, I need to get 0.55
echo floor(0.555555); //prints 0 echo round(0.555555,2); //prints 0.56 echo number_format(0.555555,2); //prints 0.56
How can I get 0.55 from 0.555555?
Of course this is an example, I could also receive 1.888 (and I need 1.88 from it) or 23.7777777777777777 (and I need to get 23.77)
This post has been edited by Alhazred: 18 August 2012 - 03:39 PM

New Topic/Question
Reply



MultiQuote






|