Skip to content

mijuanmontalvo/Juan_Montalvo-Chapter-1-Try-Items

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

Juan_Montalvo-Chapter-1-Try-Items

Include code of Chapter-1-Try-Items Name: Juan Montalvo Class: Introduction to PHP

https://github.com/mijuanmontalvo/Juan_Montalvo-Chapter-1-Try-Items/blob/main/README.md

'Chocolate', // Item on offer 'qty' => 5, // Quantity to buy 'price' => 5, // Usual price per pack 'discount' => 4, // Offer price per pack ]; $usual_price = $offer['qty'] * $offer['price']; // Usual total price $offer_price = $offer['qty'] * $offer['discount']; // Offer total price $saving = $usual_price - $offer_price; // Total saving ?> <title>The Candy Store</title>

The Candy Store

<h2>Multi-buy Offer</h2>

<p><?= $greeting ?></p>

<p class="sticker">Save $<?= $saving ?></p>

<p>Buy <?= $offer['qty'] ?> packs of <?= $offer['item'] ?> 
  for $<?= $offer_price ?><br> (usual price $<?= $usual_price ?>)</p> 

About

Include code of Chapter-1-Try-Items

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published