title: pagination of php glob page
body: <p>i have a page that uses glob to display images that is inside a folder. The thing is, i want to display only 20 pics per page. The tutorials about pagination that i found online is related with database, but i did not use database inside my code. </p>
  
  <pre><code>$files = glob("uploaded_files/*.*");
  usort($files, function ($a, $b) {
  return filemtime($b) - filemtime($a);
  });
  
  foreach ($files as $file) {
  echo "&lt;img src='$file' style='height:180px;width:180px; border:2px solid black;  margin:20px 0px 10px  10px; *margin:10px 0px 10px 20px;'&gt;";
  }
  </code></pre>
  
  <p>this is my code. how can i make it so that it displays 20 images per page and auto paginate? tq</p>