title: How to remove array index from a json_encode php
body: <p>I'm trying to remove numbers that is being display in my json 2d array. I first had an 2d array that is dynamic and deletes elements from that array. Then it converts the array to a json 2d array. The problem is I don't want the numbers at the start.</p>
  
  <p><strong>Like below</strong></p>
  
  <pre><code>[ 
  
  "1": {"StateName":"Alaska","StateAbbr":"AK"}, 
  "2": {"StateName":"Alabama","StateAbbr":"AL"}, 
  "3": {"StateName":"Arkansas","StateAbbr":"AR"}, 
  "4": {"StateName":"Arizona","StateAbbr":"AZ"}, 
  "5": {"StateName":"California","StateAbbr":"CA"}, 
  "6": {"StateName":"Colorado","StateAbbr":"CO"}, 
  "7": {"StateName":"Connecticut","StateAbbr":"CT"} 
  
  ]  
  </code></pre>
  
  <p><strong>I would like it to be like this</strong></p>
  
  <pre><code>[ 
  
  {"StateName":"Alaska","StateAbbr":"AK"}, 
  {"StateName":"Alabama","StateAbbr":"AL"}, 
  {"StateName":"Arkansas","StateAbbr":"AR"}, 
  {"StateName":"Arizona","StateAbbr":"AZ"}, 
  {"StateName":"California","StateAbbr":"CA"}, 
  {"StateName":"Colorado","StateAbbr":"CO"}, 
  {"StateName":"Connecticut","StateAbbr":"CT"} 
  
  ]
  </code></pre>
  
  <p>With out the numbers. How can I do this?</p>
  
  <p>I tried mysql_fetch_assoc but it doesn't work it.  </p>
  
  <pre><code>$arr = array();
  while($row = mysql_fetch_assoc($result)) {
    $arr[] = $row; 
  }
  echo json_encode($arr);
  </code></pre>