Answers for "2.30 will display 2.3 in php"

PHP
0

2.30 will display 2.3 in php

echo floatval(7.00);
7
echo floatval(2.30);
2.3
echo floatval(1.25);
1.25
echo floatval(1.125);
1.125

echo (float) 7.00;
7
echo (float) 2.30;
2.3
echo (float) 1.25;
1.25
echo (float) 1.125;
1.125
Posted by: Guest on August-14-2020

Browse Popular Code Answers by Language