I have an array like this one.
$array = Array(
[0] => Array
(
[name] => Eve Greenhaw
[id] => 456564765
)
[1] => Array
(
[name] => Tyrone Hallberg
[id] => 5467652534
)
[2] => Array
(
[name] => Julio Torbert
[id] => 254564564
)
[3] => Array
(
[name] => John Torbert
[id] => 5462253455
)
[4] => Array
(
[name] => John Kimmell
[id] => 4525462
)
)
I want to search through the array and return the name and id. For example if the user searches for 'John', I wants the function to return keys 3, and 4. If the user searches for just 'J', the function should return keys 2,3 and 4.