The What
Description
This construct, in_array
checks if a value (not the key only the value) exists within the given array.
Parameters
needle
- The value you want to search for within the array (haystack).
haystack
- The given array to be searched.
strict
- optional When set to
TRUE
, it will check not only for the value to be equal, but also the data type matches the needle.
Return Values
Returns TRUE
if the value does exist in the array; else you’ll get a FALSE
back.
You get WET when you swim. Stay DRY when you code.
More coming soon…keep checking back.