Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($q->rowCount()>0){
- while ($r = $q->fetch()) {
- $myJson->$r['id']= [
- 'id' => $r['id'],
- 'title' => $r['title'],
- 'type' => $r['type'],
- 'cost' => $r['cost'],
- 'cat' => $r['cat'],
- 'end' => $r['end'],
- ];
- }
- echo json_encode($myJson);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement