how to get a json object from json array php code example
Example 1: how to get data from json array in php
$data = json_decode($json);
Example 2: return json in php
//code igniter
$query="qry";
$query = $this->db->query($query);
$res=$query->result();
return json_encode($res);