Php while loops site gets stuck


#1


https://www.codecademy.com/courses/web-beginner-en-5YvPF/0/6?curriculum_id=5124ef4c78d510dd89003eb8

Since i make the neccesary correction i press the save & submit button and nothing happens. It stays stuck there and nothing at all.


Replace this line with your code. 
<!DOCTYPE html>
<html>
    <head>
		<title>Much a do-while</title>
	</head>
	<body>
    <?php
		$loopCond = false;
		do {
			echo "<p>The loop ran even though the loop condition is false.</p>";
		} while ($loopCond = true);
		
		
		echo "<p>Now the loop is done running.</p>";
    ?>
    </body>
</html>


#2

@courseace16199,
The build of a do-while loop
is like

do {
} while ( condition);

The condition is either

  • an expression with a comparison like $loopCond == true
    ( and NOT an assignment like $loopCond = true )

http://php.net/manual/en/control-structures.do.while.php


#3

I have this issue as well.

When you type code, the site tried to auto update the preview window, gets errors and then completely freezes.

I made a similar error as @courseace16199 and cannot correct it, as the site does not save my changes whatever I do. I cannot even reset the code as the site does not save those changes either. When I refresh, the broken code reappears and I am therefore blocked from progressing. :frowning:

Is there any way to force-reset a step?

EDIT: Left the page to idle for 5 min with the altered and correct code. Either that solved it or some backend hero saved my day, but it finally managed to save my changes.

Needless to say though, this course is hanging on by threads when it comes to stability.


#4

When it locks up, try making the correction, highlighting all of your code, copy, hit refresh, highlight all of the code, and then paste. That way you don't lose any of your progress.

Edit: Unfortunately, it seems that it is locking up no matter which browser I use. I have tried it with Chrome, Firefox, and Edge and all of them lock up occasionally.