i have this array,
$sql = "SELECT s.sitter_id,s.sitter_id,s.name as sitter_name,s.mobile_no FROM `maggie_trusted_circle` t INNER JOIN maggie_sitters s ON t.sitter_id = s.sitter_id Where t.mom_id =". $params['mom_id'];
$trusted_circle = $this->db->executeQuery($sql);
and i am using this to acess more data via
for($i=0; $i<sizeof($trusted_circle); $i++)
{
$mutual_friend = $trusted_circle[$i]['sitter_id'];
$mutual_friend_name = $trusted_circle[$i]['sitter_name'];
$sql = "SELECT s.sitter_id,s.name as sitter_name,s.mobile_no FROM `maggie_trusted_circle` t INNER JOIN maggie_sitters s ON t.sitter_id = s.sitter_id Where t.mom_id =". $mutual_friend;
$extended_trusted_circle[$i] = $this->db->executeQuery($sql);
$extended_trusted_circle[$i]['mutual_friend_id']= $mutual_friend;
$extended_trusted_circle[$i]['mutual_friend_name']= $mutual_friend_name;
}
and encoding the response
return json_encode(array('flag'=>1, 'message'=>'Success' ,'extended_trusted_circle'=>$extended_trusted_circle);
everything works fine, except the index numbers are also printed in the JSON Response
what could be the reason for this? i believe normally the index numbers are not printed along, am i missing something?
