The key of the associative array is dynamically generated. How do I get the \"Key\" of such an array?
$arr = array (\'dynamic_key\' => \'Value\');
You can use array_shift(array_keys($arr)) (with array_values for getting the value), but it still does a loop internally.
array_shift(array_keys($arr))
array_values