function GetPager($count,$pager) { $begin = 开始时间; $end = 结束时间; $rs=mysql_query("SELECT * FROM 数据表 WHERE (pubdate BETWEEN $begin AND $end) ORDER BY pubdate DESC limit ".($pager-1)*$count.",".$count); while ($r=mysql_fetch_assoc($rs)) { $temp[]=$r; } $html_string="
"; foreach($temp as $k=>$v) { //假设 url字段为链接地址,title为新闻标题,pubdate为发表时间 $html_string.="
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn