title: Flexible PHP / MySQL pagination
body: <p>On my website I have quite a lot of pages that need to be paginated. I have solution for that, but it requires to put pagination function in each page. I searched for something flexible like having pagination function in one file (say pagination.php) and use it to paginate various data from database, so different <code>mysql_queries</code> and html output. But I was not able to find anything useful.</p>
  
  <p>So could anyone please suggest php pagination function that would be flexible, so paginate data from different queries and outputs that are established on different pages.</p>