Problem with the interpreter window


#1


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


Every time I try to run the program, the interpreter's window send this error and when I click the "Save & submit button" it freezes the screen as waiting something.

The error I get in the interpreter is this one:

Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN on line 18


<html>
  <head>
    <title>Modifying Elements</title>
  </head>
  <body>
    <p>
      <?php
        $languages = array("HTML/CSS",
        "JavaScript", "PHP", "Python", "Ruby");
        $languages{0} = "Python " ;
        echo $languages{0} ;
      ?>
    </p>
  </body>
</html>


#2

There should be no leading space before a semi-colon. Your string also has a trailing space that the SCT may not expect.


#3

I had to logout and then log in again and it worked. Bout now, it's getting me another error. I already published the new error.

Thanks any way...


#4

I am having the same issues and error messages as noted above with the PHP lessons. I input the correct code but the interpreter freezes or something and doesn't recognize that the code is correct. But if I copy the code, reset the code editor, refresh the page, and then paste in the code it then recognizes that the code is correct.


#5

I just find that the interpreter freezes when you try to write several lines of code. It's like it cannot deal with interpreting all the time.


#6

It may be necessary to apply the same temporary hack I recommend for exercise containing loops. Introduce a parse error straight off, then remove the code when ready to submit.

<?php else ?>

or anything that is incorrect.


#7

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