Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP compare order?

Does it matter in php?

     
9:55 pm on Sep 24, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 2, 2004
posts:187
votes: 0


In PHP does it matter which way you compare?

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

Thanks

10:13 pm on Sept 24, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members