Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. <?php
  2.  
  3. $array = ['red', 'green', 'blue'];
  4.  
  5. $quantity = count($array);
  6.  
  7. // if ($quantity == 5)
  8. //if ($quantity = 5)
  9. if (5 == $quantity)
  10. {
  11. echo "There are five items";
  12.  
  13. } else {
  14.  
  15. echo "There are NOT five items";
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement