Morelli and Smith

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/www.w3.org/TR/html401/loose.dtd"> user-defined * function, and a foreach loop to "sing" (print) the verses * of {@link http://www.carols.org.uk/the_twelve_days_of_christmas.htm The * Twelve Days of Christmas}. * * @author    R. Morelli  * @version   1.0 * @package   default * @license   http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL) * */ ?>

Twelve Days of Christmas "a partridge in a pear tree",             "second"=>"two turtle doves",              "third"=>"three French hens",              "fourth"=>"four calling birds",              "fifth"=>"five golden rings",              "sixth"=>"six geese a-laying",              "seventh"=>"seven swans a-swimming",              "eighth"=>"eight maids a-milking",              "ninth"=>"nine ladies dancing",              "tenth"=>"ten lords a-leaping",              "eleventh"=>"eleven pipers piping",              "twelfth"=>"twelve drummers drumming");

/** * Prints the verses of the Twelve Days of Christmas song. * * @param array $verses Associative array of the form day1=>gift1, day2=>gift2,... * @access public * @return void */ function sing_twelve_days($verses) {   foreach ($verses as $day=>$gift) {       print("On the $day of Christmas "); print("my true love gave to me"); print("$gift "); } } ?>





 The Twelve Days of Christmas 