0
为什么显示出与PHP函数不正确的结果?为什么用php函数显示不正确的结果?
这是我的代码。这是必须的,以显示0
但是,当我测试此代码。这表明99
为什么?????
<?PHP
$first = "8.12";
$second = "0.12";
$first = ($first)*(100);
$second = ($second)*(100);
$results = ($first)-($second);
echo ($results)%(100);
?>
当与浮点值的工作,使用'FMOD()'函数。 – kainaw