<?php
$data = array(
'report_id' => (int) $r['report_id'],
'openDate' => self::isoDate($r['open_date']? $r['open_date'] : '2015-09-08 12:06:00'),
'openedBy' => $r['opened_by']? (int) $r['opened_by'] : 42,
'response' => array(
'text' => $r['answer'],
'creationDate' => self::isoDate($r['answer_date']),
'author' => (int) $r['account_id']
),
'credits' => array(
'member_id' => (int) $r['member_id'],
'campaign_id' => (int) $r['project_id'],
'category' => (empty($r['points_category']))? 5: 5,
'description' => $r['points_reason'],
'date' => self::isoDate($r['answer_date']),
'amount' => $r['points']
)
);
//if(!empty($r['publish'])) {
array_merge ($data, array('published'=> $r['publish']));
//}
die(var_dump($data));
preferences:
52.49 ms | 402 KiB | 5 Q