<?php
echo round(10.8); // 11
echo '<br />';
echo round(10.4); // 10
echo '<br />';
/*you can also set the number of precision,
or in other words number of decimal digits
you like to round the floating number
*/
echo round(10.837, 2); // 10.84
echo '<br />';
echo round(10.435767, 4); // 10.4358
echo '<br />';
?>
Get Free Sinhala IT Learning Videos Kuppiya.com

No comments:
Post a Comment