Student B

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">  Assignment 1   * @version 1.0 */

/**       * Associative array containing lyrics indexed by 'day' * @var array */       $days["First"] = "A partridge in a pear tree."; $days["Second"] = "Two turtle doves."; $days["Third"] = "Three french hens."; $days["Fourth"] = "For calling birds."; $days["Fifth"] = "Five golden rings."; $days["Sixth"] = "Six geese a-laying."; $days["Seventh"] = "Seven swans a-swimming."; $days["Eighth"] = "Eight maids a-milking."; $days["Ninth"] = "Nine ladies dancing."; $days["Tenth"] = "Ten lords a-leaping."; $days["Eleventh"] = "Eleven pipers piping."; $days["Twelfth"] = "Twelve drummers drumming.";

/**       * Prints out the song * @param array $song */       function sing($song) { print "\n"; foreach ($song as $day => $gift) { print "On the {$day} day of christmas, my true love gave to me {$gift}\n"; }       }

sing($days); ?>