I have the number 2.23456789
, I want to get it only 2.23 by using PHP,but I do not know how to do this, anyone help me please,Thanks.
You could use the round(value,precision)
function. In your case, use:
round(2.23456789,2);
For further information check the PHP manual: http://php.net/manual/en/function.round.php
You simply want to round
the number.
Use phps number_format
function.