╰┈➤ The array_keys() function returns an array containing the keys.
function arrayKeys($array) {
    print_r($array);
    return array_keys($array);
}
print_r(arrayKeys(["House" => "White", "Car" => "Black"]));
// testing print_r outputs: ( [House] => White, [Car] => Black ) // The function returns: ( [0] => House, [1] => Car )
by Luka Khitaridze
2 years ago
PHP
Functions
0
Pro tip: use ```triple backticks around text``` to write in code fences