Re: Control Structure problem
| From: | Luke Skywalker | Date: | Wed, 17 Sep 2003 00:50:58 +0000 |
| Subject: | Re: Control Structure problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162817@lists.php.net to get a copy of this message | ||
yeah, i really like using cases they work well and especially if you want to
do something different for different values, i forgot about that, its a good
way to do it,
does php have case else? cuz that is a really handy thing in VB that people
often forget...
Luke
----- Original Message -----
From: "Curt Zirzow" <php-general@zirzow.dyndns.org>
To: <php-general@lists.php.net>
Sent: Wednesday, September 17, 2003 10:49 AM
Subject: Re: [PHP] Control Structure problem
> * Thus wrote Chris W. Parker (cparker@swatgear.com):
> > Dan J. Rychlik <mailto:drychlik@tcsconsult.com>
> > on Tuesday, September 16, 2003 5:12 PM said:
> >
> > > Thank you guys. I truly know the level of expertise on this mailing
> > > list, and I know that it proves invaluable.
> >
>
> >
> > p.p.s. I totally think that the syntax you presented is logical and
> > should be available. It makes much more sense to me to do it the way you
> > did, but alas...
>
> Well technically you can do it like:
>
> switch ($var) {
> case 'TEST-1': case 'TEST-2': case 'TEST-2':
> do something
> }
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>