switch ($i) {
case 0:
print "i equals 0";
break;
case 1:
print "i equals 1";
break;
case 2:
print "i equals 2";
break;
}
- Original Message -
From: "Allen May" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April
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 equivelent
>
>
> I have a list
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
>
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
4 matches
Mail list logo