Jan 11, 2005 #1 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
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
Jan 11, 2005 Thread starter #2 percent IS-IT--Management Apr 27, 2004 176 US *ment couldn't find anything Upvote 0 Downvote
Jan 11, 2005 1 #3 quarryknight Programmer Jan 1, 2005 29 US 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! http://www.DealMerchant.net Upvote 0 Downvote
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! http://www.DealMerchant.net
Jan 11, 2005 Thread starter #4 percent IS-IT--Management Apr 27, 2004 176 US thanks for the info Upvote 0 Downvote
Jan 11, 2005 #5 zonalnet Programmer Jan 11, 2005 1 US 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. Upvote 0 Downvote
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.
Jan 11, 2005 #6 Olavxxx Programmer Sep 21, 2004 1,134 NO http://no2.php.net/tokens Olav Alexander Mjelde http://www.volvo-power.netAdmin & Webmaster Upvote 0 Downvote