Search within associative array
this is value -- pc..5 Parent
this is column -- $data['user_name']
array_search('pc..5 Parent', array_map(function($data) {return $data['user_name'];}, $arrayofparents));
this is value -- pc..5 Parent
this is column -- $data['user_name']
Array
(
[0] => Array
(
[id] => 12
[user_name] => Tintin-PC..1 Parent
[port] => 744
[ip] => 122.162.235.239
[source] => India
[type] => 1
[version] => 1
)
[4] => Array
(
[id] => 25
[user_name] => pc..5 Parent
[port] => 264
[ip] => 115.249.8.245
[source] => India
[type] => 1
[version] => 5
)
Comments
Post a Comment