Advertisement
Guest User

Untitled

a guest
Oct 9th, 2021
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function cariArray($input){
  2. $arr = [
  3. "bandung",
  4. "jakarta",
  5. "cimahi"
  6. ];
  7.  
  8. for($i = 0; $i <= sizeof($arr); $i++){
  9. if($arr[$i] == $input){
  10. return true;
  11. } else {
  12. return false;
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement