我正在爲項目製作一個shoppingcart.php文件,該文件由同一項目中另一個名爲「catalog.php」的文件提供信息。我堅持的東西是if語句在while循環中(它應該通過來自catalog.php的傳入表單數據循環)。出於某種原因,它不是這樣的:在一個if語句中多次檢查的PHP語法
//Loop through each form field (this page is called from catalog.php):
//If form field’s value (product quantity) is a positive number
//(nonzero), is NOT the submit button, AND the remove checkbox for
//removing this product has NOT been checked (do these checks in one
//condition):
while (list($productID,$qty) = each($_POST)){
if(($qty > 0) && (type != submit) && (checkbox != isset())){
}
}
我的if語句有什麼問題?
什麼是錯誤訊息? – Jocelyn 2013-05-04 18:11:57
是否存在沒有'$'的變量? – 2013-05-04 18:13:14
(type!= submit)&&(checkbox!= isset())它是什麼? – qisho 2013-05-04 18:14:38