title: Make PHP Pagination from Json data
body: <p>I have a <code>PHP curl</code> request, that returns <code>json</code> data. </p>
  
  <pre><code>"records": {
                  "name": "John;",
                  "last_name": "Travolta"
              },
  </code></pre>
  
  <p>I'm able to display this data in <code>foreach</code> loop. 
  However, it has more than 50 records. </p>
  
  <p>Is it any way for me to make pagination, so i can display 5 records per page? </p>
  
  <p>Note, request with limit doesn't work, it's still returns all data: </p>
  
  <pre><code>http://api-request-url?limit=5
  </code></pre>