Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

Re: [PHP3] Select case statments? are there any? From: Alfred Perlstein (bright <email protected>)
Date: 05/02/00

* Lyle Eckert <LyleE <email protected>> [000502 10:53] wrote:
> I was just wondering if there was something like this in php?
>
> Select $Number
>
> Case 0
> Do this
> Case 1
> Do that
>
> I looked through the manual and could find anything like it.
>
> Thanks
> Lyle

switch($foo) {
        case "bar":
                something;
                break;
        case "baz":
                something_else;
                break;
        default:
                defaultsomething;
}

-- 
-Alfred Perlstein - [bright <email protected>|alfred <email protected>]
"I have the heart of a child; I keep it in a jar on my desk."

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>