开发者

php pagination with break or continue

I need to make a paging with this format:

1 2 3 4 5 ... 205

i use now this for loop:

$nav = '';
for($pageNum = 1; $pageNum <= $maxPage; $pageNum++)
{
   if 开发者_运维百科($pageNum == $p)
   {
   $nav .= '<li class=\"current\">$pageNum</li>';
   }
   else
   {
   $nav .= '<li><a href=\"?page=".$pageNum."\">$pageNum</a></li>';
   }
}

i need to use a php break or continue??


Here there ara an example http://www.programacion.com/articulo/paginar_los_resultados_de_una_consulta_en_php_149

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜