02.01.2016, 22:05
Quote:
If you use arithmetic with different data types the "weaker" data type will be converted
Now if you divide a Float with an Integer, the Integer will be converted to a Float, resulting in a Float But if you do a simple Integer division you get as result an integer PHP код:
|
It Works with this code
Код:
printf("%.2f", float(5) / float(2));