04-18-2009, 12:46 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 64
Thanks: 1
|
& and `
Hi there,
I was actually wondering why - we also use && instead of & when combining to expressions like:
PHP Code:
if($a == $b && $b == $c)
So I made a simple script to check out what an simple & would do:
PHP Code:
<?php
$a = 'a' & 'b';
echo $a;
?>
What the script gives out is the following:
´
Could someone explain why I get that funny result? And when to use a single &
thx 4 reading :)
Ou yeah and a function with a single & seems to work too:
PHP Code:
if(1 == 1 & 2 == 2) echo 'funzt';
|
|
|
|