Stuck on PHP Unit 6.2: While loop syntax


#1


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


keeps saying: Oops, try again. expected p:first-child text to be equal to The loop is running.


Replace this line with your code. 
<?php
$loopCond = true;
while ($loopCond){
//Echo your message that the loop is running below
echo "The loop is running.";
$loopCond = false;
}
echo "And now it's done.";
?>


#2

Careful of what the lesson is asking you :wink:

Inside the curly braces, use echo to output "<p>The loop is running.</p>"

Don't forget the paragraph tags!


#3

<?php

$loopCond = true;
while ($loopCond){
echo "<p>The loop is running.</p>"
$loopCond = false;
}
echo "And now it's done.";
?>

still wont work
if you know the correct code let me know please. I been playing around. I thought this might have been a problem solver.


#4

echo "<p>The loop is running.</p>"

You're missing a semicolon at the end of the statement.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.