Putting it all together


#1


https://www.codecademy.com/courses/web-beginner-en-QnQrd/0/7?curriculum_id=5124ef4c78d510dd89003eb8


I don't see a mistake but there is a error message please help.


<html>
  <head>
    <title>I am the King of Arrays!</title>
  </head>
  <body>
    <p>
    <?php
    $myArray = array('Focusrite'=>'interface',
                        'BenQ'=>'monitors',
                        'Adam'=>'speakers');

  // On the line below, output one of the values to the page:
      echo $myArray['Focusrite'];
      echo '<br/>';
      
  // On the line below, loop through the array and output
  // *all* of the values to the page:
    foreach ($myArray as $make=>$equipment){
      echo $equipment . ': ' . $make . '.<br/>';
    }
 
  ?>
    </p>
  </body>
</html>


#2

copy the code and Refresh/reload your browser :slight_smile:
then paste it


#3

ok thanks i done that and it works


#4

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