hi
how can i round a number like 10751461 upto 10800000
or 10131461 down to 10100000
depending on which is closer?
hey take a look at this page:
http://www.php.net/manual/en/function.round.php
this will likely be interesting:
echo round(3.4); // 3 echo round(3.5); // 4 echo round(3.6); // 4 echo round(3.6, 0); // 4 echo round(1.95583, 2); // 1.96 echo round(1241757, -3); // 1242000
good luck
Hi Slug!
Thats perfect, round(1241757, -3); is enough 😉
thanks!!