title: How to create AJAX pagination without a database?
body: <p>Is it possible to fetch pages for AJAX pagination without the help of MySQL? Can't I just add a PHP file with the text and markup I need to have displayed and by clicking page numbers serve that content to the user?  So can this be achieved with pure jQuery and PHP? What code approach would you do to keep things simple, I mean I have 3 walls of text I need to add to my site but adding them at once on the page would confuse the users. So I decided to find a way and keep only one of them at a time based on the user's decision. A code example would be great!</p>
  
  <p><strong>EDIT:</strong>
  Should the PHP code look something like this?</p>
  
  <pre><code>&lt;?php
      htmlspecialchars($_GET["page_number"]);
      if ($page_number == 1)
      {
          $text = var_export($text1, true);
      }
  
      if ($page_numer == 2)
      {
          $text = var_export($text2, true);
      }
  
      if ($page_number == 3)
      {
          $text = var_export($text3, true);
      }
  
      $text1 = 'some looong text...';
      $text2 = 'another wall of text';
      $text3 = 'and yet another one';
  ?&gt;
  </code></pre>