Thread: & and `
View Single Post
Old 04-18-2009, 12:46 PM   #1 (permalink)
Sakakuchi
The Contributor
 
Sakakuchi's Avatar
 
Join Date: Feb 2009
Posts: 64
Thanks: 1
Sakakuchi is on a distinguished road
Default & 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(== == 2) echo 'funzt'
Sakakuchi is offline  
Reply With Quote