Today the Dev team at Zoom Creates is having a meeting were we are getting Chinese food brought in.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <?php function lunchOrder($rice = "Fried Rice", $entre = "General Tso") { return $entre." with ".$rice; } $developers = array("Justin" ,"Kris", "Kurtis", "Nick"); $order = array(); for ($i = 0; $i < count($developers); $i++) { $order[$i] = $developers[$i]." would like to order "; if ($developers[$i] == "Kurtis" or $developers[$i] == "Justin") { $order[$i] .= lunchOrder("Steamed Rice"); } else { $order[$i] .= lunchOrder(); } } foreach ($order as $whatEachDeveloperWantsToEat) { print $whatEachDeveloperWantsToEat."<br />\n"; } ?> |




