/// 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 opinio
You are assigning the value of 9 to the variable x instead of performing a relational comparison. A common mistake. = is the assignment operator whereas == is the equality comparison operator.
http://en.wikipedia.org/wiki/Assignment_(computer_science)#Assignment_versus_equality