0

Are there any built-in functions in PHP as there are in Excel?

For example ROUND(value, position after decimal point)

22nd Mar 2019, 2:59 AM
Bernard Anlage IV
Bernard Anlage IV - avatar
1 Réponse
+ 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
22nd Mar 2019, 3:50 AM
LynTon
LynTon - avatar