Jokes solution

<!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 print several light bulb * jokes. See {@link http://www.weirdity.com/jokes/light-bulb.shtml Low Engery * Light Bulb Jokes}.

* @author    R. Morelli  * @version   1.0 * @package   default * @license   http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL) * */ ?>

Light Bulb Jokes "None. That's what students are for.",              "accountants" => "What answer did you have in mind?",               "computer programmers" => "Two; one always leaves in the middle of the project.");

/** * Prints the jokes * * @param array $jokes Associative array of the form target1 => punchline1,... * @access public * @return void */ function print_jokes($jokes) {   foreach ($jokes as $target=>$punchline) {       print("Question: How many  $target does it take to change a light bulb? "); print("Answer: $punchline "); } } ?>





 Some Light Bulb Jokes 