Codecademy should fix this issue


#1

what's wrong with this code. Its showing the error that it looks like you didn't printed the element you modified(i.e J2EE).

<?php
$languages = array("HTML/CSS",
"JavaScript", "PHP", "Python", "Ruby");
$languages[0] = "J2EE" ;
echo $languages[0];

  ?>

#2

Hello Saurabh07,

I can't really see the issue, when trying your code I got the same error.
So I reset the code and write my own solution, and it works!

At the moment I can't see any difference between your code and my code. I suggest you copy my code and see if it works.

My code:

<?php
     $languages = array("HTML/CSS", "JavaScript", "PHP", "Python", "Ruby");
        
     // Write the code to modify
     // the $languages array!
     $languages[0] = "J2EE";
     echo $languages[0];
?>

EDIT:
I found a difference, there is a space between "J2EE" and the semicolon coming after.
But this shouldn't be the problem.


#3

I got it. Actually I was writing the code before the comment line.