(PHP 4 )
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
|
|