(PHP 4, PHP 5)
array_keys — Restituisce tutte le chiavi di un array
     array_keys() rstituisce le chiavi, numeriche e
     stringa, dell'array input.
    
     Se il parametro opzionale valore_ricerca è specificato,
     solo le chiavi che corrispondono a quel valore vengono restituite. Altrimenti, vengono restituite tutte
     le chiavi dell'array input.
    
Example #1 Esempio di array_keys()
?php
$array = array(0 => 100, "colore" => "rosso");
print_r(array_keys($array))
$array = array("blu", "rosso", "verde", "blu", "blu");
print_r(array_keys($array, "blu"));
$array = array("colore" => array("blu", "rosso", "verde"),
               "misura" => array("piccola", "media", "grande"));
print_r(array_keys($array));
?>
Il risultato di questo programma sarà:
Array
(
    [0] => 0
    [1] => colore
)
Array
(
    [0] => 0
    [1] => 3
    [2] => 4
)
Array
(
    [0] => colore
    [1] => misura
)
Vedere anche array_values() e array_key_exists().