我以爲我有這個語法的權利,但顯然我不......這是我的。如何在php中添加值?
/* Price Calculation */
if ($stage="1") $price + 1000 = $price;
if ($stage="2") $price + 2500 = $price;
if ($stage="3") $price + 5000 = $price;
if ($chrome=on) $price + 100 = $price;
if ($bov=on) $price + 200 = $price;
if ($controller=on) $price + 500 = $price;
if ($filter=on) $price + 50 = $price;
print "<br /><u>Total: </u>";
echo $price;
變量已被正確聲明,所以我知道不是這樣。這個php對=有問題。我做錯了什麼?
還在說意外的 「=」 ... – 2012-01-30 05:04:00
另一部分固定它。我有我的平等倒退。不能相信我忽略了那個... – 2012-01-30 05:08:01
@JoshI,我更新了我的答案 – saturngod 2012-01-30 05:12:15