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

Home » Imported messages » comp.lang.php » switch says value is equal to case when it is not
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: switch says value is equal to case when it is not [message #184683 is a reply to message #184682] Wed, 15 January 2014 18:06 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Wed, 15 Jan 2014 09:32:47 -0800, Frank Catry wrote:

> between every CASE you need BREAK;

Actually you don't, and in this case he probably doesn't.

If he wants to use a switch case to execute a single statement on any of
multiple matches, he needs to use the appropriate combination of case and
break statements, as described and demonstrated at

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

His biggest problem at the moment is that he doesn't understand that the
comparison that's being made is not the comparison that he thinks is
being made.

A secondary problem that he has had for a long time is that occasionally
he picks up on a piece of incorrect crap that he reads on the internet
such as "between every CASE you need BREAK;", latches on to it, and then
remains convinced that it is gospel writ by the almighty himself even
when he is told quite clearly that it is wrong.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php.ini loading
Next Topic: How to locally install Wordpress, Ubuntu 8.10 , XAMPP already installed.
Goto Forum:
  

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

Current Time: Sat Nov 30 20:08:45 GMT 2024

Total time taken to generate the page: 0.04118 seconds