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

Control Flow: Switch Forum

View Course

432 points
563f564eb62548d5c9000854_286301216
Submitted by
Darkhorse2
almost 2 years ago

5/6 Code is correct but wheel spins forever

Code is correct but wheel spins forever each time until I reload page.
Program has serious issues.


0 votes

permalink

I have the same

240 points
54c2a5ef95e378e83800240c_322521353
Submitted by
Kaaas
almost 2 years ago


0 votes

permalink

This worked for me.

<!DOCTYPE html>





<?php
$i = 5;

switch ($i) :
    case 0:
        echo '$i is 0.';
        break;
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
        echo '$i is somewhere between 1 and 5.';
        break;
    case 6:
    case 7:
        echo '$i is either 6 or 7.';
        break;
    default:
        echo "I don't know how much \$i is.";
endswitch;

?>
</body>

513 points
5488809f86f55248ea0025cc_909110855
Submitted by
pipo hofstra
almost 2 years ago