What i do help me?


#1


https://www.codecademy.com/en/courses/web-beginner-en-jZv2E/0/5?curriculum_id=5124ef4c78d510dd89003eb8#


i didnt know what i do.


<!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>


#2

HI the lesson aske you to

Make the code use the alternative syntax rather than the curly-brace syntax.
the switch statement has two syntax

$i = 10;

switch ($i) {
   #here put your case
}

or

 
$i = 10;

switch ($i):
   #here put your case
endswitch;

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.