PHP Parsing error that works on localhost?


I seem to not be able to do exercise 1 of Control Flow: Switch.

When I run the code on my local PHP server, it gives me the correct response, You're one, but when I run it through Codecademy, it says Parse error: syntax error, unexpected ';' on line 12.

<!DOCTYPE html>
    $myAge = 1;
    if($myAge == 1) {
        echo "You're one";
    elseif($myAge == 2) {
        echo "You're two";
    else {
        echo "You're a wizard, Harry!";

Anyone helping me?


Did you try after refreshing your browser?


I did, but it still isn't parsing :confused:


can you please post a full screenshot?

also include the lesson link please


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