array_keys

Syntax:array array_keys ( array $input [, mixed $search_value = NULL [, bool $strict = false ]] )
Description:Return all the keys or a subset of the keys of an array

<?php
$array = array(0 => 100, "color" => "red");
print_r(array_keys($array));
?>
    
OUTPUT

Array ( 
[0] => 0 
[1] => color 
)