2015-04-06 82 views
0

大家歡樂復活節! :)IF聲明中的雙重條件PHP

有誰知道什麼是不對的雙重IF條件:

if (empty($_POST['request_article_form'])) and empty($_POST['article_number_article_table'])) {//blabla } 

從IDE錯誤: 修復[1/1]語法錯誤,意想不到的T_LOGICAL_AND上線37

回答

2

')' 添加額外的

使用此

if (empty($_POST['request_article_form']) and empty($_POST['article_number_article_table'])) { 
    // do something 
} 
+0

謝謝你,有一個愉快的一天 – 2015-04-06 07:30:51

0

只是算括號,你打開它3次,關閉4次。

if (empty($_POST['request_article_form']) and empty($_POST['article_number_article_table'])) { 
    // do something 
}