如何使用循环删除数组的第一个元素

I have very little experience with PHP, but I'm taking a class that has PHP review exercises. One of them is to create a function that uses a loop to return all values of an array except the first value in an unordered list. I'm assuming there's a way to do this using a foreach loop but cannot figure out how. This is what I had but I feel like I am far off:

<?php    
$array = array('myName' => 'Becca', 'favColor' => 'violet', 'favMovie' => 'Empire Strikes Back', 'favBook' => 'Lullaby', 'favWeb' => 'twitter.com');

$myName = $array['myName'];
$favColor = $array['favColor'];
$favMovie = $array['favMovie'];
$favBook = $array['favBook'];
$favWeb = $array['favWeb'];

echo '<h1>' . $myName . '</h1>';

function my_function() {
foreach($array == $myName){
   echo '<ul>'
   . '<li>' . $favColor . '</li>'
   . '<li>' . $favMovie . '</li>'
   . '<li>' . $favBook . '</li>'
   . '<li>' . $favWeb . '</li>'

   . '</ul>';
 }
}

my_function();
 ?>

Change the code to following

<?php    
      $array = array('myName' => 'Becca', 'favColor' => 'violet', 'favMovie' => 'Empire Strikes Back', 'favBook' => 'Lullaby', 'favWeb' => 'twitter.com');

$myName = $array['myName'];

echo '<h1>' . $myName . '</h1>';

 function my_function($array)
    {
       $count = 0;
       echo "<ul>";
       foreach($array as $key => $value)
       {
           if($key != "myName")
           {
               echo "<li>".$value."</li>";
           }

        }
        echo "</ul>"; 



    }    


my_function($array);

The correct syntax of foreach is

foreach (array_expression as $key => $value)

instead of

foreach($array == $myName){

function that uses a loop to return all values of an array except the first value

I'm not sure, what exactly you mean by except the first value. If you are trying to remove first element from the array. Then you could have used array_shift

If you are supposed to use loop then

$count = 0;
foreach ($array as $key => $value)
{
   if ($count!=0)
   {
     // your code
   } 
   $count++;
}