dreamjob/lib/Cake/Test/test_app/View/Posts/json/index.ctp

15 lines
311 B
Plaintext
Raw Normal View History

2014-02-18 12:10:29 +01:00
<?php
$paging = isset($this->Paginator->options['url']) ? $this->Paginator->options['url'] : null;
$formatted = array(
'user' => $user['User']['username'],
'list' => array(),
'paging' => $paging,
);
foreach ($user['Item'] as $item) {
$formatted['list'][] = $item['name'];
}
echo json_encode($formatted);