On 05 Apr 2001 11:53:21 +0200, Christian Reiniger wrote:
switch ($foo) {
case "bar1":
$foobar="fooey";
break;
default:
$foobar = "NoBar";
}
> > I have a list of conditions I want to test against.
> > In ASP, I would do:
> > How do I do the equivelent in PHP?
> Try reading the m
On Wednesday 04 April 2001 20:07, you wrote:
> I have a list of conditions I want to test against.
> In ASP, I would do:
>
> Select Case foo
> case "bar1"
> foobar = "fooey"
> case "bar2"
> foobar = "fooey2"
> case "bar3"
> foobar = "fooey3"
> case else
>
See the "switch" statement.
http://www.php.net/manual/en/control-structures.switch.php
Kirk
> -Original Message-
> From: Allen May [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 04, 2001 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Select case equivel
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 2:07 PM
Subject: [PHP] Select case equivelent
> I have a list of conditions I want to test against.
> In ASP, I would do:
>
> Select Case foo
> case "bar1"
> foobar = "fooey"
>
I have a list of conditions I want to test against.
In ASP, I would do:
Select Case foo
case "bar1"
foobar = "fooey"
case "bar2"
foobar = "fooey2"
case "bar3"
foobar = "fooey3"
case else
foobar = "NoBar"
End Select
How do I do the equivelent in PHP?
5 matches
Mail list logo