array_filter's advance usage
Here is an example of advance usage of php's array_filter method. It will first create an 'Object' and then call its 'Method' instead of calling regular 'function' in the 'call-back' parameter.
<?php class get_ar { var $key; function get_ar($to_srch) { $this->key = $to_srch; } function key_array($v) { if($v['res_id']==$this->key) return true; } } $page_res_0 = array_filter($page_res, array(new get_ar(0), 'key_array'));













