limiting a number to 2 decimal places
Posted: Fri Jul 29, 2005 5:09 pm
how can I limited a number to 2 decimal places like
2.34
or have 2.346 be 2.35
2.34
or have 2.346 be 2.35
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$number = 5.73458565;
$twodecimals = round($number,2);