How can I make paginate this simple line of PHP code?
<p>I want to know how can I paginate this very simple of line of code:</p>

<pre><code>    &lt;?php

for($i=1;$i&lt;=40;$i++){
    echo '&lt;a href="#"&gt;'.$i.'&lt;/a&gt; | ';
}

?&gt;
</code></pre>

<p>it's ouput:</p>

<p><img src="http://i.stack.imgur.com/F2t42.png" alt="enter image description here"></p>

<p>I want to make it like this:</p>

<p><img src="http://i.stack.imgur.com/Bk17F.png" alt="enter image description here"></p>
