diff --git a/functions/array.xml b/functions/array.xml index 8d5018f68a..d1536713fc 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -1,5 +1,5 @@ - + Array Functions Arrays @@ -2886,6 +2886,12 @@ blue, large, sphere, medium a case-sensitive manner. + + + In PHP versions before 4.2.0 needle was not + allowed to be an array. + + <function>in_array</function> example @@ -2901,7 +2907,7 @@ if (in_array ("mac", $os)) { ]]> - The second condition fails because in_array() + The second condition fails because in_array is case-sensitive, so the program above will display: + + + <function>in_array</function> with an array as needle + + + +// This will output: + +'ph' is found +'o' is found +]]> + + + See also array_search.