I'm trying to round up the value if it has cents, for example:
69990
to be 70000
, I'm working on none USD currency, I've tried many answers in the community, I couldn't make it work .
My example code :
$gg = rtrim(number_format(69990, 1), '.');
echo $gg . "\n <br />";
echo round($gg , 2, PHP_ROUND_HALF_UP);
echo "\n <br />";
echo number_format($gg,2);
And the output is :
69,990.0
<br />69
<br />69.00