php中的分页(isset($ _ REQUEST ['start_page']))

时间:2016-10-17 09:28:54

标签: php pagination

我无法理解last_record和start_point将如何获得

if(isset($_REQUEST['start_page'])){

        $last_record = $_REQUEST['start_page'] * $_REQUEST['limit'];
        $start_point = $last_record - $_REQUEST['limit'];
    }
    else
    {
        $start_point= 0;
        $last_record= 5;            
    }
    if(isset($_REQUEST['limit'])){
        $limit = $_REQUEST['limit']; 
    }
    else
    {
        $limit = 5;
    }

1 个答案:

答案 0 :(得分:0)

我希望这个演示适合你http://demos.9lessons.info/pagination.php