PHP数字格式与计算

时间:2014-05-18 08:15:47

标签: php mysql

我仍然相对较新,所以我很抱歉,如果这看起来像一个简单的解决方案,我正在进行计算,我希望答案在小数点后面显示2个数字。现在它正在给我上面的结果而不是替换表中的数字。

http://www.cnghl.biz/cnghldb/cnghlgoalieinfo.php?GoalieID=71

这是我目前设置的

    Print "<tr>";
Print "<td><center>".$row['Sea']."</center></td> ";
Print "<td><center>".$row['Team']."</center></td> ";
Print "<td><center>".$row['GP']."</center></td> ";
Print "<td><center>".$row['Min']."</center></td> ";
$iGAA = $row['GA'] * 60 / $row['Min'];
Print $english_format_number = number_format($iGAA, 2);
Print "<td><center>".$iGAA."</center></td> ";
Print "<td><center>".$row['W']."</center></td> ";
Print "<td><center>".$row['L']."</center></td> ";
Print "<td><center>".$row['OTL']."</center></td> ";
Print "<td><center>".$row['T']."</center></td> ";
Print "<td><center>".$row['SO']."</center></td> ";
Print "<td><center>".$row['GA']."</center></td> ";
Print "<td><center>".$row['SA']."</center></td> ";
Print "<td><center>".$row['PCT']."</center></td> ";
Print "<td><center>".$row['PIM']."</center></td> ";
Print "<td><center>".$row['Assists']."</center></td> ";

}

你能告诉我如何解决它,所以我能得到正确答案,谢谢。

1 个答案:

答案 0 :(得分:2)

您正在打印错误的变量:

Print "<td><center>".$english_format_number."</center></td> ";