Not sure why I'm getting a syntax error


#1


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


I'm not exactly sure what I did incorrectly when writing this bit of code on my own. The error that comes out is "Parse error: syntax error, unexpected T_SWITCH on line 10" - Any thoughts?


<!DOCTYPE html>
<html>
    <head>
		<title></title>
	</head>
	<body>
    <?php
    $i = '4'
    
    switch ($i) {
        case 1:
            echo 'Overpriced!';
            break;
        case 2:
            echo 'Too Expensive!';
            break;
        case 3:
            echo 'Just right!';
            break;
        case 4:
            echo 'Not expensive enough.';
            break;
        default:
            echo 'Not sure if the price is correct.';
    }
    ?>
	</body>
</html>


#2

line 7, you have no semicolon to end your set operation


#3

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