Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Only Shoes Shoe Shop</h1>
- <?php
- for ($i = 0; $i < 5; $i++){ // <-- remove and put :
- ?>
- <p>We sell shoes</p>
- <?php
- } // <-- remove and put endfor;
- ?>
- <h1>Shoe Shop</h1>
- <?php
- $footwear = [
- "sandals" => 4,
- "sneakers" => 7,
- "boots" => 3
- ];
- ?>
- <p>Our footwear:</p>
- <?php
- foreach ($footwear as $type => $brands):
- ?>
- <p>We sell <?=$brands?> brands of <?=$type?></p> //because this is in HTML mode, have to use <?= $variable ?> for variables
- <?php
- endforeach;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement