RE: [PHP] Quick conditional question
| From: | James Taylor | Date: | Sat, 10 May 2003 06:02:37 +0000 |
| Subject: | RE: [PHP] Quick conditional question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147093@lists.php.net to get a copy of this message | ||
I *suppose* I could use a switch, but I wanted a way to shorten the
code, but span it across numerous lines :)
-----Original Message-----
From: Greg Donald [mailto:destiney@destiney.com]
Sent: Friday, May 09, 2003 11:00 PM
To: James Taylor
Cc: php-general@lists.php.net
Subject: Re: [PHP] Quick conditional question
> How can I shorten this syntax:
>
> If($row==1||$row==9||$row==13||$row==20) blah
switch($row){
case 1:
case 9:
case 13:
case 20
// blah
break;
}
--
Greg Donald
http://destiney.com/