プロジェクトの shoppingcart.php ファイルを作成しています。このファイルには、同じプロジェクト内の「catalog.php」という別のファイルから情報が供給されます。私が立ち往生しているのは、while ループ内の if ステートメントです (catalog.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 ステートメントの何が問題になっていますか?