Re: if statement
| From: | Steve Buehler | Date: | Tue, 30 Sep 2003 16:49:40 +0000 |
| Subject: | Re: if statement | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164425@lists.php.net to get a copy of this message | ||
To Brad, Marek and Curt (and anybody who responds after this)
Thank you so much for your help. This is going to help me out so much in a lot of my scripts. It will sure make them a little.....No....a LOT more portable now.Thanks Steve At 11:26 AM 9/30/2003, you wrote:
Steve Buehler wrote: [snip]$array=("/etc/bind/options.conf.wp","/etc/bind/rndc.conf.wp","/etc/bind/keys.conf.wp"); if($k2b==$array){You are close. Check out in_array(). http://us4.php.net/in_array if (in_array($kb2, $array)) - Braddo this1}else{do this2}