// Define the callback
function extract_named_sub_elements(&$item, $key, $name) {
$item = $item[$name];
}
// Test data
$original = array(
array('page' => 'page1', 'name' => 'pagename1'),
array('page' => 'page2', 'name' => 'pagename2'),
array('page' => 'page3', 'name' => 'pagename3'),
);
// Use a copy, as array_walk() operates directly on the passed in array
$copy = $original;
// Substitute 'name' with whatever element you want to extract, e.g. 'page'
array_walk($copy, 'extract_named_sub_elements', 'name');
print_r($copy);