Answers for "how to stop round of in php"

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
2

php round decimal

$value = 1.23456789;
$rounded_value = round($value, 2); 
// 2 is the precision here we will get 1.23
Posted by: Guest on April-01-2020
2

round up built in function php

echo ceil(0.5); //Prints 1
Posted by: Guest on March-03-2020

Browse Popular Code Answers by Language