<?php
header('Content-Type: application/json');
$result['response']['type'] = 'Feature';
$result['response']['id'] = '0';
for ($i = 1; $i <= 12; $i++) {
$result['response']['items'][] = array(
"title" => "Rear Window",
"director" => "Alfred Hitchcock",
"year" => 1954,
"photo" => array(
"1" => 1954,
"2" => 1954
)
);
}
echo json_encode($result);
?>
<?php
header('Content-Type: application/json');
$result['response']['type'] = 'Feature';
$result['response']['id'] = '0';
for ($i = 1; $i <= 12; $i++) {
$item = array(
"title" => "Rear Window",
"director" => "Alfred Hitchcock",
"year" => 1954,
);
for ($j = 1; $j <= 4; $j++) {
$item['photo'][$j] = 1954;
}
$result['response']['items'][] = $item;
}
echo json_encode($result);
?>