你现在的位置:首页 > PHP网站建设知识库 > phpcms > 正文

phpcms v9数据库查询自定义分页实现代码

{pc:content action="lists" catid="$catid" num="12" order="id DESC" return="data1" page="$page"}<select name="select_pages" onchange="location.href=this.options[this.selectedIndex].value;">
{loop $data $r1}
{/loop}{str_replace("a href", "option value", str_replace("..", "", str_replace("</a", "</option", str_replace("a class", "option class", str_replace("</span>", "页</option>", str_replace("<span>", "<option selected>//", str_replace("> ", ">", $pages)))))))}</select>{/pc}