Re: [PHP] Select case equivelent

2001-04-05 Thread Christian Reiniger

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
 foobar = "NoBar"
 End Select

 How do I do the equivelent in PHP?

Try reading the manual.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Error 032: Recursion error - see error 032

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Select case equivelent

2001-04-05 Thread Geir Eivind Mork

On 05 Apr 2001 11:53:21 +0200, Christian Reiniger wrote:

switch ($foo) {
case "bar1":

$foobar="fooey";
break;

etc...
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 manual.

-- 
 php developer / CoreTrek AS| Old programmers never die, they just hit
 Sandnes / Rogaland / Norway| account block limit. 
 web: http://www.moijk.net/ | 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Select case equivelent

2001-04-04 Thread Allen May

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?

Thanks

-Allen
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Select case equivelent

2001-04-04 Thread Jon Rosenberg

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 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"
 case "bar2"
 foobar = "fooey2"
 case "bar3"
 foobar = "fooey3"
 case else
 foobar = "NoBar"
 End Select
 
 How do I do the equivelent in PHP?
 
 Thanks
 
 -Allen
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Select case equivelent

2001-04-04 Thread Johnson, Kirk

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 of conditions I want to test against. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]