Output is showing JavaScriptphp


Still having issues with this.

       $languages = array("HTML/CSS",
        "JavaScript", "PHP", "Python", "Ruby");
        echo $languages[1];
        // javascript
          $languages[1] = "php";
        echo $languages[1];

Any suggestions on what to do here? My Output is showing JavaScriptphp, rather than just one. Think that's a system error?

6/7 modifying array elements

echo does not include any white space. We have to add it.

echo '<br><br>'


I had a similar problem with that, but now i know where we went wrong. the output should be just one instead of two. Thats what the system wants us to do. delete the first echo on the $languages[1];
after that your code should look likes this:
//we dont have to print javascript
$languages[1] = "php";

echo $languages[1];
// prints out your new assigned output


A link to the exercise is SOOOO helpful...


In line 8, there's an array named $languages.
1. Change an item in the $languages array. You can take your pick!
2. Then use echo to output $languages.

Essentially, the first echo is not expected. When both print out (with a line break),

        echo $languages[0];
        echo '<br>';
        $languages[0] = "HTML5/CSS3";
        echo $languages[0];

we get this SCT error message:

It looks like you printed 'HTML/CSS'--that's one of the original elements! Make sure to print your modified element.


:wink: yupzz you are saying absolutely right.. but still system is showing error ....