kadin
asked on
Simple math in php
Why does it echo 0.04 and 0.0333333333333 and not 25 and 30?
How do I fix? Thanks.
How do I fix? Thanks.
<?php
error_reporting(E_ALL);
$width = '50';
$height = '20';
$newWidth = 2/(100 - $width);
$newHeight = 2/(80 - $height);
echo $newWidth;
echo $newHeight;
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER