adding php files for second exercise
This commit is contained in:
12
src/02-shipping/docroot/shipping.php
Normal file
12
src/02-shipping/docroot/shipping.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
// Returns an array of made-up shipping options.
|
||||
function get_shipping_options($zipcode, $pounds) {
|
||||
$baseCost = round($zipcode / 10000) + ($pounds * 5);
|
||||
$options = array( "Next Day" => $baseCost * 4,
|
||||
"Two Day Air" => $baseCost * 2,
|
||||
"Saver Ground" => $baseCost);
|
||||
return $options;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user