Answers for "php round numbers k m"

PHP
8

php round down

// round down
echo floor(1.5); // prints 1

// round up
echo ceil(1.5); // prints 2
Posted by: Guest on May-30-2021
0

php round to the nearest 10

$number = ceil($input / 10) * 10;
Posted by: Guest on July-21-2021

Browse Popular Code Answers by Language