thinkphp实现数组分页示例


public function nodeslist(){
$portal = new PortalApi;
$nodelist = $portal->getNodeLists($this->uid);

$count = count($nodelist['data']);
$p = new Page($count,10);
$lists = array_slice($nodelist['data'], $p->firstRow,$p->listRows);
$page = $p->show();
$this->assign('page',$page);
$this->assign('nodes',$lists);
$this->display(); 
 }

http://www.jb51.net/article/48964.htm

你可能感兴趣的:(thinkphp实现数组分页示例)