This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by katido
about 9 years

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

Permalink

<!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>
points
Submitted by Zulekha Khokhar
almost 9 years

Answer 5520a32d95e37860e6000716

0 votes

Permalink

Hi katido,

Your code is fine. Have you tried:

- Refreshing the page? - Clearing cache/trying in incognito/private mode? - Switching browsers?

points
Submitted by Zeke Y
almost 9 years