Infinite loop broke the exercise 3 (Your First While Loop)


I had write "=" not "==" at while and it had been saved. So now refreshing the page doesn't helps.
I am done the php course to 98% and I want to done it at all, but I cant save the right code on the lesson, please help.

<!DOCTYPE html>
		<title>A loop of your own</title>
        <link type='text/css' rel='stylesheet' href='style.css'/>
	//Add while loop below
    $a = 1;
    while ($a = 1) {
        echo "The Loop is going on";
        $a = 2;


In your while( condition )
you are using the assignment operator,
but you should use a comparison operator


Yes, I am understand it, but when I reload the page, and write there comparision operator, it couldn't be saved cause the page is crashed - thats what I see


I have the same problem.

//Add while loop below
while (1) {
echo "infinite";

refresh doesn't work


So, this makes no sense right? I mean, if its not showing me an output, how is it letting me go ahead?


In your =while= condition you should use a comparison operator like == or ===

If you use a semi-colon-; it is interpreted as an End-of-Statement....

while( $myName == "Akshay" );

you have created a =while= with NO attached code-block

if you use

if ( $myName == "Akshay" );

you have closed the IF statement and a following ELSE is NOT expected by the interpreter


how should i reset the code.refresh the page doesn't work.



++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).


the code can't be reset ,i tried all you said.


I have the same problem.
I've tried quite a few solutions, even different browsers.
The loop is saved on an infinite situation and then when you load the exercise, you cannot submit it because the exercise doesn't correctly load with the loop going at the autosaved state.