PHP loop error?


the page gets stuck. the preview keeps giving the circle load and when i press submit the button dissapear. i tried reloading several time but it keeps putting back this code even after i reset

        $roll = rand(1,6);
        while ($roll != 6) :

        echo $roll;



The Instructions:
Create a do/while loop below the comment
within the <?php ?> tags in the editor.
Then click Save & Submit Code to make sure it behaves the way you think it should.

You are uing the while()-endwhile loop

You are giving the variable $roll a rondomized Value between 1 and 6

Then if the $roll variable does not have the Value of 6
you will enter the while loop
AND you will NEVER leave this while loop !!!!!


The code will be saved client side u can fix this by either deleting your cookies or launching firefox in private modus :slight_smile: for anyone having problems like this