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

23rd Dec 2018, 7:28 AM
Vikraant
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
23rd Dec 2018, 7:54 AM
Taste
Taste - avatar