I need to append a prefix to each key in my array. The prefix it is defined outside the create_function I am using. How can I make it accessible from inside?
Here my code ($result is my array of key => value):
$groupName = $reader->getAttribute('name');
$resultKeyPrefixGroup = array_combine(
array_map(create_function('$k', 'return $groupName."/".$k;'), array_keys($result)),
$result
);
Thank you!