All On Your Own!


#1

what seems to be the problem here? The error is:
Parse error: syntax error, unexpected T_DEFAULT on line 18
Line 18 is: echo "alpha is 300";

Here is the full code:
<?php
$alpha = 300;

switch ($alpha) {
    case 120:
        echo "alpha is 120";
        break;
    case 250:
        echo "alpha is 250";
        break;
    case 300:
        echo "alpha is 300";
        break;
default:
    echo "alpha is unknown";
} 
?>

#2

Your code is correct. Please try to refresh the exercise or use different browser.


#3

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