/// infinite loop??
$x=1;
while($x=9){
echo $x;
$x++;
}
i dont understand the reason behind, why the above code causes infinite loop in my opinion above code should output "9" once. but it outputs endless 999999999......
at first (when x is equal to 1) while statement is false so nothing happens, then x becomes 2 but again while statement is false;
So when x becomes 9 while statement is true so it should echo 9 then we add 1 due to x++; and it becomes 10 so while statement becomes false but as i see it doesnt because
it continues to echo 9999999.......
pls enlighten me regarding the above code. best regards.
note:i have checked the similar questions but cant find the answer for my situation thx