The array_keys function returns an array the keys in an array.

    
    $array = array(0 => 100, "color" => "red");

    $keys = array_keys($array);

    print_r($keys);

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