TheJoey Posted October 22, 2009 Share Posted October 22, 2009 Mabye a stupid question just wondering what it does, and if it works if u only put | one of these. Link to comment https://forums.phpfreaks.com/topic/178567-what-does-do-in-code/ Share on other sites More sharing options...
dreamwest Posted October 22, 2009 Share Posted October 22, 2009 | is a deliminator aka a seperator || is OR ....so $one = 'three'; if($one =='three' || $one=='two'){ echo "Either two or three"; } Logically: $one = 'three'; if($one =='three' OR $one=='two'){ echo "Either two or three"; } Link to comment https://forums.phpfreaks.com/topic/178567-what-does-do-in-code/#findComment-941711 Share on other sites More sharing options...
TheJoey Posted October 22, 2009 Author Share Posted October 22, 2009 Thank you sir Link to comment https://forums.phpfreaks.com/topic/178567-what-does-do-in-code/#findComment-941714 Share on other sites More sharing options...
trq Posted October 22, 2009 Share Posted October 22, 2009 In php... | is the bitwise Or (inclusive Or) operator. || is the logical Or operator. Operators are all covered within the manual. Link to comment https://forums.phpfreaks.com/topic/178567-what-does-do-in-code/#findComment-941716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.