I got this multiple array named $files[], which consists of keys and values as below :
[0] => Array
(
[name] => index1.php
[path]
You can make use of the array_walk function as:
$arr = array(
array("name" => "Jack", "id" => 1),
array("name" => "Rose", "id" => 2),
);
$result = array(); // initialize result array.
array_walk($arr, "filter"); // iterate over the array calling filter fun for each value.
// $result will now have elements "Jack" and "Rose"
function filter($a) {
global $result; // to access the global result array.
$result[] = $a['name']; // for each array passed, save the value for the key 'name' in the result array.
}