Home  >  Article  >  Backend Development  >  How should this judgment statement be written?

How should this judgment statement be written?

WBOY
WBOYOriginal
2016-07-06 13:54:071191browse

The if(isset($_POST['num'])) written before is now added with a condition and written like this if(isset(($_POST['num'])||($_GET['page'] )) But I get an error when I write it like this. How should I change it? ( ! ) Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in D :wampwwwqq.php on line 76

Reply content:

The if(isset($_POST['num'])) written before is now added with a condition and written like this if(isset(($_POST['num'])||($_GET['page'] )) But this is an error. How should I change it? ( ! ) Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in D :wampwwwqq.php on line 76

isset can only be variables, not expressions.
can be changed to:

<code>if (isset($_POST['num']) || isset($_GET['page'])) {
    // TODO
}</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn