(PHP 4 >= 4.0.0)
in_array -- Vrßtit
TRUE, pokud v poli existuje danß hodnota
Popis
bool
in_array ( mixed needle, array haystack, bool strict)
Hledß v haystack needle
a pokud ji najde, vracφ TRUE, jinak
FALSE.
Pokud je t°etφ argument strict TRUE,
in_array() takΘ kontroluje typ needle
v haystack.
P°φklad 1. Ukßzka in_array() $os = array ("Mac", "NT", "Irix", "Linux");
if (in_array ("Irix", $os)){
print "Got Irix";
} |
|
P°φklad 2. Ukßzka in_array() s argumentem strict // V²stup bude:
1.13 found with strict check |
|