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

Control Flow: Switch Forum

View Course » View Exercise

392 points
Ec89bb8214bbde4a9a2ed1dff528bc2a?s=140&d=retro
Submitted by
leighwgyb
about 3 years ago

I'm doing what they say, and its erroring me?

  I change the case_:
                      case_:

to read

<!DOCTYPE html>
<html>
    <head>
        <title></title>
    </head>
    <body>
    <?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.";
    }
    ?>
    </body>
</html>

and it fails me???


0 votes

permalink

Try pressing Reset Code, Ctrl + F5, Ctrl + Shift + F5, or F5 and complete the exercise again.

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


0 votes

permalink

edit echo with " " instead of ' '

309 points
53569fff282ae3a22f0000ca_541305722
Submitted by
Niladry Shekhar Ray
over 1 year ago