$count = count($article);//总条数 $start=($page-1)*$pagesize;//偏移量,当前页-1乘以每页显示条数 $article = array_slice($article,$start,$pagesize);