0
Are there any built-in functions in PHP as there are in Excel?
For example ROUND(value, position after decimal point)
1 Respuesta
+ 4
Yes, PHP comes with many built-in functions, here is a list of all of them:
http://php.net/manual/en/indexes.functions.php
The one that matches your example would be round():
http://php.net/manual/en/function.round.php
So for example:
------------------------------------------
$pi = 3.14159;
echo round(pi, 3);
------------------------------------------
Would output 3.142