[PHP] case statement?

2002-12-19 Thread Max Clark
Hi-

I was wondering if php had a case function?

Instead of building a large if/elseif/else block I would like to do a case
$page in (list).

Thanks in advance,
Max





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] case statement?

2002-12-19 Thread Rick Emery
switch()
{
  case a:
  case b:
  case c:
  default:
}

RTFM
- Original Message - 
From: Max Clark [EMAIL PROTECTED]
To: 
Sent: Thursday, December 19, 2002 12:19 PM
Subject: [PHP] case statement?


Hi-

I was wondering if php had a case function?

Instead of building a large if/elseif/else block I would like to do a case
$page in (list).

Thanks in advance,
Max





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] case statement?

2002-12-19 Thread Chris Wesley
On Thu, 19 Dec 2002, Max Clark wrote:

 I was wondering if php had a case function?

 Instead of building a large if/elseif/else block I would like to do a
 case $page in (list).

switch function ...

http://www.php.net/manual/en/control-structures.switch.php

~Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] case statement?

2002-12-19 Thread Ford, Mike [LSS]
 -Original Message-
 From: Max Clark [mailto:[EMAIL PROTECTED]]
 Sent: 19 December 2002 18:19
 
 I was wondering if php had a case function?
 
 Instead of building a large if/elseif/else block I would like 
 to do a case
 $page in (list).

http://www.php.net/control-structures.switch

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] case statement?

2002-12-19 Thread Manuel Ochoa

Yes, It's called SWITCH

Just go to www.php.net and lookup switch in the function list
 Max Clark [EMAIL PROTECTED] wrote:Hi-

I was wondering if php had a case function?

Instead of building a large if/elseif/else block I would like to do a case
$page in (list).

Thanks in advance,
Max





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] case statement?

2002-12-19 Thread Mark Charette

On Thu, 19 Dec 2002, Max Clark wrote:

 Hi-
 
 I was wondering if php had a case function?
 
 Instead of building a large if/elseif/else block I would like to do a case
 $page in (list).

The documentation and search capabilities at http://www.php.net are your 
frientd. It would behhove you to at least read the basic language 
statemants.

mark C.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php