Control structure - easier way than repeating conditions in IF?

From: Date: Fri, 30 Apr 2004 15:48:38 +0000
Subject: Control structure - easier way than repeating conditions in IF?
Groups: php.general 
Request: Send a blank email to php-general+get-185051@lists.php.net to get a copy of this message
Hello! Can anyone tell me if there is an easier/shorthand for: if ( ($x == $a) || ($x == $b) || ($x == $c) || ($x == $d) ....... ) {;} I understand the logic of why the following does not work: if ($x == ($a || $b || $c || $d)) {;} Thanks!

« previous php.general (#185051) next »