<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Code The World — Simple pagination]]></title>
		<link>https://codetheworld.com/viewtopic.php?id=78</link>
		<atom:link href="https://codetheworld.com/extern.php?action=feed&amp;tid=78&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Simple pagination.]]></description>
		<lastBuildDate>Mon, 16 Jun 2008 04:13:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Simple pagination]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=220#p220</link>
			<description><![CDATA[<div class="codebox"><pre><code>    $limit = 30;
    $start = ($num-1)*$limit; 
    $start = round($start,0);

            $totalpages = mysql_num_rows(mysql_query(&quot;SELECT * from `table`&quot;)); 
            $totalpages = $totalpages / $limit; 
            $totalpages = round($totalpages,0); 
            $c = 0;                                                
                    
            while($c&lt;$totalpages){                                        
            $page = $c + 1;                                                
            if($_GET[&#039;num&#039;]==$page){                                    
            echo &quot;[$page] &quot;;                            
            }else{                                                    
            echo &quot;&lt;a href=?action=pinArchive&amp;num=$page&gt;[$page] &lt;/a&gt;&quot;;
            } 
            $c = $c+1; 
            } 
            echo &quot;&lt;br&gt;&quot;.$totalpages.&quot; Pages in total.&quot;;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (a3d2i2)]]></author>
			<pubDate>Mon, 16 Jun 2008 04:13:40 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=220#p220</guid>
		</item>
	</channel>
</rss>
