how to add decimal numbers in php code example
Example 1: php float 2 decimais
$foo = "105";
echo number_format((float)$foo, 2, '.', '');
Example 2: PHP Numbers
<?php
$x = 5985;
var_dump(is_int($x));
$x = 59.85;
var_dump(is_int($x));
?>
$foo = "105";
echo number_format((float)$foo, 2, '.', '');
<?php
$x = 5985;
var_dump(is_int($x));
$x = 59.85;
var_dump(is_int($x));
?>