array_key_exists
Controlla se l'indice (o chiave) specificato esiste nell'array
Descrizione
boolarray_key_exists
mixedchiave
arraycerca
array_key_exists restituisce &true; se il
parametro chiave esiste nell'array.
chiave può essere qualsiasi valore accettabile
per un indice di array.
esempio di array_key_exists
1, "secondo" => 4);
if (array_key_exists("primo", $un_array)) {
echo "L'elemento 'primo' è nell'array";
}
]]>
Il nome di questa funzione è key_exists
nel PHP versione 4.0.6.
Vedere anche isset.