The required answer i am not getting?


#1


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

it says did you use = to modify one of the elements of $languages.

<html>
  <head>
    <title>Modifying Elements</title>
  </head>
  <body>
    <p>
      <?php
        $languages = array("Web",
        "JavaScript", "PHP", "oops", "Ruby");
        
        // Write the code to modify
        // the $languages array!
        echo $languages[3];
      ?>
    </p>
  </body>
</html>


#2

If you want to modify anything at the array, you should write the name of the array, and the identification number of the thing that you want to change between square brackets.

EX:
<?php
$languages = array("HTML/CSS",
"JavaScript", "PHP", "Python", "Ruby");

    $languages[0] = "C++";

    echo $languages[0];
    // Write the code to modify
    // the $languages array!

  ?>

at this example the first string at the array will change to become C++.


#3

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