The array_keys() function is used in PHP to return with an array containing keys.
Here is the syntax for the array_keys() function: array_keys(array, value, strict)

Here is an example to demonstrate its use

$a=array("Volvo"=>"AAAAAAAA","BMW"=>"BBBBBBB","Toyota"=>"CCCCCC");
print_r(array_keys($a));

Output:

Array ( [0] => Volvo [1] => BMW [2] => Toyota )

BY Best Interview Question ON 15 Apr 2020