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

While Loops in PHP Forum

View Course » View Exercise

735 points
Picture
Submitted by
Oladimeji Gbolahan
about 3 years ago

please help i dont know why my code wont pass

please the code passes but it keeps giving an error message that you did not use endwhile. help me out please.

  <?php
    //Add while loop below
    $CoinFlip = true;
    while($CoinFlip == true):
        echo "FLIP FLIP FLIP FLIP";
       $CoinFlip = false;
    endwhile;
    ?>

Edited By Gaurang Tandon to fix code formatting


0 votes

permalink

Your code works for me. Please try pressing Reset Code, Ctrl + F5, and try again.

Thanks.

2570 points
56ec11ba1ec4b00bc400069e_656519138
Submitted by
Gaurang Tandon
about 3 years ago