<?php $arr = [ [ 'id'=>1, 'name'=>'Tom' ], [ 'id'=>2, 'name'=>'Tom' ], [ 'id'=>3, 'name'=>'Tom' ], [ 'id'=>4, 'name'=>'Tom' ], [ 'id'=>5, 'name'=>'Tom' ] ]; $arr1 = array_filter($arr,function($val){return $val['id'] < 3;}); $arr2 = array_filter($arr,function($val){return $val['id'] > 3;});
$arr3 = array_filter($arr,function($val){return $val['id'] ==4;});
var_dump($arr2);exit; ?>