This forum is now read-only. Please use our new forums! Go to forums
1.3 Your First While Loop: Solution to your problems
I used the exact code within the hint of the lesson.
<!DOCTYPE html>
<html>
<head>
<title>A loop of your own</title>
<link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
<?php
//Add while loop below
$loopCount = 0;
while ($loopCount<4){
echo "<p>Iteration number: {$loopCount}</p>";
$loopCount ++;
}
?>
</body>
</html>
Answer 5576029476b8fe2a1e0004b2
3 votes
<!DOCTYPE html>
<html>
<head>
<title>A loop of your own</title>
<link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
<?php
//Add while loop below
$i = 5;
$loopCount = 0;
while ($loopCount<4){
echo "<p>Iteration number: {$loopCount}</p>";
$loopCount ++;
}
?>
</body>
</html>
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency