I've just started learning php an hour ago. I've made this code:
$x=2;  
$y=4;  
echo $x;  
echo $y;  
if($x=5) 
{    
    echo "$x";  
}  
else  
{  
    echo "test";  
}
I'm expecting the output: 24test
I'm getting the output: 245
x equals 2 in the beginning. Why is x then changing to 5 when the only thing I do is CHECKING whether x = 5?
I've searched the web and this site for an answer but couldn't find anything. Thanks in advance!
Tony
 
    