I have an "if" statement that I would like to make a little bit more generic. This is how the statement looks now.

if($k2b=="/etc/bind/options.conf.wp" || $k2b=="/etc/bind/rndc.conf.wp" || $k2b=="/etc/bind/keys.conf.wp"){
do this1
}else{
do this2
}


What I would like to do is to have an array earlier in the script of just the items that it is checking for so that it can be more easily changed if I put this out as free or shareware software. Here is what it might look like, but I know that if this is possible, it probably won't look at all like this:

$array=("/etc/bind/options.conf.wp","/etc/bind/rndc.conf.wp","/etc/bind/keys.conf.wp");
if($k2b==$array){
        do this1
}else{
        do this2
}

I think that might make enough since to see if someone can help me on this. This would be real nice for me in use in a lot of scripts.

Thanks
Steve

PHP / MySQL

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to