Code: Select all
$parent = array(
'child' => array(
'key1' => 'value1',
'key2' => 'value2'
),
'other' => array(
'key1' => 'value1',
'key2' => 'value2'
)
);
$var = current($parent);Let's say i want to write a function that echoes the key name of given array...
something like:
Code: Select all
echo array_key_name($var);Something tells me that the sollution is just stupid easy... so don't be rude... i'm having a bad day here... my brain isn't working as usual hehe
any thoughts?