FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Switch question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Switch question [message #184599] Sun, 12 January 2014 16:48 Go to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
The manual for PHP switch shows no examples on how to use multiple values
for the same case.
In liberty basic I would use the following:
case 1,2,3,4
case "A","B","C"

What is the equivelant in PHP?

I use the following code to acquire a value:
$value=$_GET['v'];
switch ($value){
case "A";
echo "Does Not Work!";
case A:
echo "Does Not Work!";
}

So what is the proper way to ensure the proper case is found correctly?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: signed int64 pack/unpack
Next Topic: Trouble connecting to a PHP SoapServer module
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 07:19:34 GMT 2024

Total time taken to generate the page: 0.05152 seconds