Oops, try again. It looks like 'hair=>black' is part of $myArray, but it wasn't printed to the page!


#1







<?php
// On the line below, create your own associative array:
$myArray = array('hair' => 'black', 'eyes' => 'green', 'hands' => 'long');

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


why doesn't it work?


#2

It sounds like this post from the old forum it talking about what you are seeing there. It contains an explanation for the bug and two different workarounds that you can use.

https://www.codecademy.com/forum_questions/52596214548c350036004c8c


#3

same problem here, had bugs like this before