0
Convert int to float in php
how do i convert int to float in php like 4.0+4.0 should be 8.0 display
1 Resposta
+ 3
You can use floatval to make sure the calculation done in float, then use number-format for the display
http://php.net/manual/en/function.floatval.php
http://php.net/manual/en/function.number-format.php