Re: If-statement
| From: | Ryan Fischer | Date: | Wed, 29 Aug 2001 17:55:28 +0000 |
| Subject: | Re: If-statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65066@lists.php.net to get a copy of this message | ||
You wrote:
> Is it possible to write this shorter:
>
> if ($Var != "No1" && $Var != "No2" && $Var !=
> "No3") {
> code
> };
if(!ereg("^No[1-3]$", $Var)){
// code
}
--
-Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/