This forum is now read-only. Please use our new forums at discuss.codecademy.com.

While Loops in PHP Forum

View Course » View Exercise

1175 points
A5ba1285e8142aa3740cc08378e41d6c?s=140&d=retro
Submitted by
Reianna-Bryant
almost 2 years ago

Is there something wrong with my code that the system is not showing me?

This is what my code looks like:
$loopCount = 2;
while ($loopCount < 8) {
echo "Starting number: {$loopCount}";
$loopCount ++;
}

It passed after a page error with the webpage, but I get the error message "Parse error: syntax error, unexpected '<' on line 15 >" instead of an output. Is something wrong here and I just don't know about it?


0 votes

permalink

The code you provided works fine. It says error on line 15 which means there is something wrong before line 15.

125 points
91ea0d13f213ee15d29e8f24b295420f?s=140&d=retro
Submitted by
Mubeen001
almost 2 years ago

1 Comment

566354cc937676913a000061_638238020 DAGIROV Djamal almost 2 years ago

he's got right your code is perfectly working, what's the matter ?