homepage Welcome to WebmasterWorld Guest from 23.22.173.58
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP compare order?
Does it matter in php?
HeadBut

10+ Year Member



 
Msg#: 3751583 posted 9:55 pm on Sep 24, 2008 (gmt 0)

In PHP does it matter which way you compare?

if("Registesr" == $SomeVariableOr['Thing']){DoSomething();}
Or
If($SomeVariableOr['Thing'] == "Register"){DoSomething();}

Thanks

 

eelixduppy

WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3751583 posted 10:13 pm on Sep 24, 2008 (gmt 0)

Not for this case. It would obviously matter if you were using other comparison operators such as less than (<) or greater than (>), though.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved