Keeps coming up as PHPjquery even though i changed php to jquery


#1

<Help me with this please. Is this a problem on codeacedemy end?!>


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


Keeps coming up as PHPjquery even though i changed php to jquery. The error code says this Oops, try again. It looks like you printed 'PHP'--that's one of the original elements! Make sure to print your modified element.


    <?php
        $languages = array("HTML/CSS",
        "JavaScript", "PHP", "Python", "Ruby");
        
        echo $languages[2];
       
       $languages[2] = "jquery";
       
       echo $languages{2};
      ?>


#2

Hi just remove the first echo this one

echo $languages[2];

#3

Thanks, I did what you said and it worked :+1:

This was codeacedemy example, It was very misleading:

<?php
$myArray = array("red", "blue", "yellow");

echo $myArray[1];
// outputs "blue"

$myArray[1] = "green";

echo $myArray[1];
// outputs "green"
?>


#4

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