note 46737 deleted from language.control-structures by bjori

From: Date: Wed, 26 Apr 2006 15:44:54 +0000
Subject: note 46737 deleted from language.control-structures by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-109760@lists.php.net to get a copy of this message
Note Submitter: Job Oberio ---- if you want to have two expressions you can use any logical operators 'and', 'or' <?php if ($num > 10 and $num < 15) { echo "number is greater than 10 but less than 15"; } ?> another way, you can enclose each expression into open/close parentheses - ( expression1 ) and (expression2) so that its easy to analyze your expressions <?php if ( ($num > 10) and ($num < 15) ) { echo "number is greater than 10 but less than 15"; } ?> i prefer using the wordings 'and' instead of '&&' operator because wordings operators are easy to analyze and easy to your eye to read especially for long expressions. the '&&' tends to be confused to $ sign

« previous php.notes (#109760) next »