Judging whether the function is in a known group!

zhaozj2021-02-16  40

Judging whether the function is in a known group!

Bool In_Array (Mixed Needle, Array Haystack ") Search NEEDLE in HayStack, if you are found, return true, otherwise returns false. If the value of the third parameter strict is true, the in_ARRAY () function will also check if the NEEDLE is the same as the Haystack. Note: If Needle is a string, the comparison is case sensitive. Note: Before PHP version 4.2.0, NEEDLE is not allowed to be an array. Example 1. In_Array () Example $ OS = Array ("Mac", "NT", "Irix", "Linux"); IF (In_Array ("Irix", $ OS)) {Print "Got Irix";} (In_Array ("Mac", $ OS)) {print "got mac";}

转载请注明原文地址:https://www.9cbs.com/read-21765.html

New Post(0)