I got this multiple array named $files[], which consists of keys and values as below :
[0] => Array
(
[name] => index1.php
[path]
thanks KennyTM for keyfilter class great tip. For those who care and don't know how to do it, this a working detailed example. I slightly improved using a regexp pattern.
$files[]= {code above};
class KeyFilter {
function KeyFilter($attr,$pattern)
{
$this->attr=$attr;
$this->pattern=$pattern;
}
function is_inarr_key($t)
{
return preg_match($this->pattern,$t[$this->attr]);;
}
}
$t=array_filter($items, array(new KeyFilter("path","~\d{2}\.php~i"), 'is_inarr_key'));
print_r($t);
print_r($o->key);
output:
[1] => Array
(
[name] => index**10**.php
[path] => http://localhost/php/gettingstarted/
[number] => 2
)
[2] => Array
(
[name] => index**11**.php
[path] => http://localhost/php/gettingstarted/
[number] => 3
)