Suppose I have the code above, how to write th
Use the in_array() function.
Manual says:
Searches haystack for needle using loose comparison unless strict is set.
Example: