May be its halepful:-
:-here you put integer 10 in $counter variable
<?php $counter = 10; ?>
now in while loop you do a process like:-you put integer 3 in the variable $counter again.
so after completing this process (putting integer 3 in the $counter variable) the process return true
the while loop will run till the process return true and ends when process return false
<?php
while( $counter =3) {// this is turn condition so loop will not stop
echo "$counter";
}
?>
ok just in this case while loop will run like
Example case 1:
<?php
while(TRUE){
//code will run
echo $counter;
//it will only give you output 3333333....to the ends of end. like this
}
?>
Example case 2:
if the process return false then while loops ends
<?php
while(FALSE){
//code will not run
}
?>
In last words:-
loop or condition will only be run when the process out come will true
1
solved My Code hangs My browser .Why? [closed]