title: Automatically creating next and previous type pages using glob
body: <p>Trying to make it so that the glob function displays only the first 10 results (text files from a folder) and then automatically the next 10 with a next button.</p>
  
  <p>Currently, I used array_slice to display only the first 10, but I'm not sure how to automate the process.</p>
  
  <pre><code>foreach(array_slice(glob("*.txt"),0,9) as $filename) {
     include($filename); }
  </code></pre>
  
  <p>Oh and while I'm at it, if possible, display something like "displaying 1-10" and last/first links. I could probably figure that out myself after I get past the first obstacle, so don't bother with this unless it's a super easy solution.</p>