php3-list | 199908
Date: 08/05/99
- Next message: Nold: "Re: [PHP3] Spliting reports from oracle queries"
- Previous message: henning.sprang <email protected>: "[PHP3] Antwort: Re: [PHP3] Antwort: Re: Antwort: [PHP3] Photo Album Example"
- In reply to: halim <email protected>: "[PHP3] switch"
- Next in thread: halim <email protected>: "[PHP3] switch"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 5 Aug 1999 halim <email protected> wrote:
> Hi,
>
> I have this one switch statement..
>
> say :
>
> switch ($table) {
> case '1' : statement;
> break;
> case '2' : statement;
> break;
> }
>
> now.. what i want is , if case '1' == case '2' ,
> how do i combine it so that both cases will execute the same statement?
In C you would do:
switch ($table) {
case '1': stmt; // FALLTHRU!!!!
case '2': stmt_for_both
break;
Notice that there is no break in the first case.
I highly suspect that PHP has the same behaviour but I did not test it.
cheers,
Aaron.
-- 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>
- Next message: Nold: "Re: [PHP3] Spliting reports from oracle queries"
- Previous message: henning.sprang <email protected>: "[PHP3] Antwort: Re: [PHP3] Antwort: Re: Antwort: [PHP3] Photo Album Example"
- In reply to: halim <email protected>: "[PHP3] switch"
- Next in thread: halim <email protected>: "[PHP3] switch"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

