title: JSON response prints index number
body: <p>i have this array,</p>
  
  <pre><code>$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-&gt;db-&gt;executeQuery($sql);
  </code></pre>
  
  <p>and i am using this to acess more data via </p>
  
  <pre><code>for($i=0; $i&lt;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-&gt;db-&gt;executeQuery($sql);
                $extended_trusted_circle[$i]['mutual_friend_id']= $mutual_friend;
                $extended_trusted_circle[$i]['mutual_friend_name']= $mutual_friend_name;
  
  
          }
  </code></pre>
  
  <p>and encoding the response</p>
  
  <pre><code> return json_encode(array('flag'=&gt;1, 'message'=&gt;'Success' ,'extended_trusted_circle'=&gt;$extended_trusted_circle);
  </code></pre>
  
  <p>everything works fine, except the index numbers are also printed in the JSON Response</p>
  
  <p><a href="https://i.stack.imgur.com/DOkqW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DOkqW.jpg" alt="enter image description here"></a></p>
  
  <p>what could be the reason for this? i believe normally the index numbers are not printed along, am i missing something?</p>