Object Oriented PHP: Paging Result Sets
http://www.webmasterbase.com/article/662Building A Dynamic MySQL Paging Class With PHP
http://www.devarticles.com/art/1/110/2

解决方案 »

  1.   

    可以
    在要换行处插入:
    <br style='page-break-after: always'>
    注:在此行后插入页分割符。
    更多用法请参照CSS。
      

  2.   


     http://www.ccidnet.com/tech/web/2001/05/22/58_2197.html
    很经典的
      

  3.   

    saucer(思归, MS .NET MVP)让我恐怖的五星级
      

  4.   

    我这里也有一个分页函数,这是我写的,你拿去用吧.
    <?
    //分页函数/**
     * Short description. 
     * 
     * Detail description
     * @param         $offset 本页第一条记录在全部查询结果中的位置
     * @param $pagelines 每页的行数
     * @param $filename 调用本函数的文件名(即包含查询语句的那个文件名
     * @param $sn 欲参与分页显示的记录的总行数
     * @global     none
     * @since      1.0
     * @access     private
     * @return     void
     * @update     date time
    */
    function pagedivide($offset,$pagelines,$filename,$sn)

       if (empty($offset)){
          $offset=0;
       }
    ?>
    <div align="right"><font color="#FF0000" size="2">
    <?if ($offset!=0){$preoffset=$offset-$pagelines;?>
    <A HREF="<? echo $filename;?>?offset=<?echo $preoffset;?>&pagelines=<?echo $pagelines;?>">上一页</A>
    <?}//if结束 如果偏移量是0,则没有上一页链接
    $page_cnt=ceil($sn/$pagelines);
    for ($j=1;$j<=$page_cnt ;$j++ ) {
        $page_offset=$pagelines*$j-$pagelines;
    ?>
    <A HREF="<?echo $filename;?>?offset=<?echo $page_offset;?>&pagelines=<?echo $pagelines;?>"><?echo $j;?></A>
    <?}//for结束 显示到所有页的链接
    if ($page_cnt!=0 && (($offset+$pagelines)/$pagelines)!=$page_cnt) {
        $backoffset=$offset+$pagelines;
    ?>
    <A HREF="<?echo $filename;?>?offset=<?echo $backoffset;?>&pagelines=<?echo $pagelines;?>">下一页</A><?}//if结束,检查是否到了最后一页?></font></div>
    <?
    } // end func
    ?>