Thanks (was: IF statement help)

From: Date: Fri, 28 Sep 2001 20:29:09 +0000
Subject: Thanks (was: IF statement help)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69223@lists.php.net to get a copy of this message
Thanks to everyone for the input. This is the one that worked the best for me, but I will no doubt have a need for some of the other suggestions in future scripts. > if (in_array($key, array("control1","control2","control3"))) Actually, I broke it down in two parts: First declare a $CONTROL array $CONTROLS = array("this","that","somethingelse","nothing") // yes, as someone mentioned, not all of the strings have the word // 'control' it. Then make the comparison if (in_array($key,$CONTROLS)) { // do something } Thanks again, Chesley

« previous php.general (#69223) next »