Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 58af1d9a8e
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 21 lines (14 sloc) 0.399 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php

$limit = $_GET['limit'] ? $_GET['limit'] : 0;
$offset = $_GET['offset'] ? $_GET['offset'] : 0;

$data = new stdClass;

$data->count = 50;
$data->body = array();

for ($r = $offset; $r < $offset + $limit; $r++) {
$row = new stdClass;

for ($c = 0; $c < 3; $c++) {
$row->{"col" . ($c + 1)} = "row" . ($r + 1) . ", col " . ($c + 1);
}

$data->body[] = $row;
}

echo json_encode($data);
Something went wrong with that request. Please try again.