Student W

/**
 * The Twelve Days of Christmas
 * Author: Student W

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">  Assignment 1  The Twelve Days of Christmas

<?php $gifts["First"] = "A partridge in a pear tree"; $gifts["Second"] = "Two turtle doves"; $gifts["Third"] = "Three french hens"; $gifts["Fourth"] = "For calling birds"; $gifts["Fifth"] = "Five golden rings"; $gifts["Sixth"] = "Six geese a laying"; $gifts["Seventh"] = "Seven swans a swimming"; $gifts["Eighth"] = "Eight maids a milking"; $gifts["Ninth"] = "Nine ladies dancing"; $gifts["Tenth"] = "Ten lords a leaping"; $gifts["Eleventh"] = "Eleven pipers piping"; $gifts["Twelfth"] = "Twelve drummers drumming"; $verse = "";

foreach($gifts as $day=>$gift){ $verse = $gift. $verse; print "On the {$day} day of Christmas, my true love gave to me {$verse} \n";

} ?>