Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple command question 1

Status
Not open for further replies.

percent

IS-IT--Management
Apr 27, 2004
176
US
in php does the | pipe char have any function if so what is it for I have searched my php manual and I could find anything
 
I think that the | symbol is used as a bitwise "or" in PHP.

So the use is:
Code:
$c = $a | $b; //Bits that are set in either $a or $b are set.

Unless you're manipulating bits, I don't know if you'll need this.

Hope this helps.

Find the best deals online!
 
Yes, | in php is 'or'
Code:
if($something==$something_else || $blah=true){
//do something
}

This code will check to see if the variable 'something' is equal to 'something_else' OR if 'blah' is true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top