SHARE
TWEET

Untitled

a guest Jun 25th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if($q->rowCount()>0){
  2.  while ($r = $q->fetch()) {
  3.     $myJson->$r['id']= [
  4.        'id' => $r['id'],
  5.        'title' => $r['title'],
  6.        'type' => $r['type'],
  7.        'cost' => $r['cost'],
  8.        'cat' => $r['cat'],
  9.        'end' => $r['end'],
  10.     ];
  11.  }
  12.  echo json_encode($myJson);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top