assign jason response to php variable code example
Example: return json in php
//code igniter
$query="qry";
$query = $this->db->query($query);
$res=$query->result();
return json_encode($res);
//code igniter
$query="qry";
$query = $this->db->query($query);
$res=$query->result();
return json_encode($res);