Answers for "php laravel rount price to 99"

PHP
0

php laravel rount price to 99

$input = 17.99; // example input
$add = $input + 0.01;
$round = round($add);
$output = $round - 0.01;

simpler
return round($input + 0.01) - 0.01;
Posted by: Guest on January-12-2021

Browse Popular Code Answers by Language