Using all parameters:


SUBMITTED BY: henry1874w

DATE: June 26, 2017, 5:24 p.m.

FORMAT: Text only

SIZE: 433 Bytes

HITS: 910

  1. <?php
  2. $people = array("Peter", "Joe", "Glenn", "Cleveland", 23);
  3. if (in_array("23", $people, TRUE))
  4. {
  5. echo "Match found<br>";
  6. }
  7. else
  8. {
  9. echo "Match not found<br>";
  10. }
  11. if (in_array("Glenn",$people, TRUE))
  12. {
  13. echo "Match found<br>";
  14. }
  15. else
  16. {
  17. echo "Match not found<br>";
  18. }
  19. if (in_array(23,$people, TRUE))
  20. {
  21. echo "Match found<br>";
  22. }
  23. else
  24. {
  25. echo "Match not found<br>";
  26. }
  27. ?>

comments powered by Disqus