adding php files for second exercise

This commit is contained in:
Dan Buch
2010-02-17 21:50:28 -05:00
parent 872ed812ca
commit a914a910d0
3 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<?php
// shipping.php contains our get_shipping_options($zipcode, $pounds) function.
// It returns an array mapping service name to price in US dollars.
require ('shipping.php');
$options = get_shipping_options($_REQUEST[zipcode], $_REQUEST[pounds]);
foreach ($options as $service => $price) {
$result[] = "$service: $price USD";
}
print implode("\n", $result);
?>