$last_number = $data['last_number']?$data['last_number']:0;
$pageSize=4; $total=count($list);$r=$list;
//$list为结果集
$list=array_slice($list,($last_number*$pageSize),$pageSize);//这里的$list为截取的结果
if($last_number==-1){ $last_number=-1; }else{//这里的$r为原$list
$list2=array_slice($r,(($last_number+1)*$pageSize),$pageSize); if(!count($list2)){ $last_number=-1; }else{ $last_number=$last_number+1; } }