【发布时间】:2015-04-03 09:34:40
【问题描述】:
我有一个严重的问题。如果商品应该打折,我的页面正在执行一个简单的公式来更新价格。
<?php if(isset($row_Brand['Sale']))
{
$YourPrice = ($row_Brand['Sale'] * number_format($row_Recordset1['Price'], 2, '.', ''));
}
else
{
($YourPrice = number_format($row_Recordset1['Price'], 2, '.', ''));
}
?>
Price 的值为 1,549.00。但是,数字格式使用上面的代码使其变为 1.00。因此,结果是遥遥无期。这是一个严重的问题,我看不出代码有什么问题。
【问题讨论】:
标签: php number-formatting