title: Script returns null on fetching results
body: <p>I'm trying to query a database using PHP script and pass JSON string. I'm using this script from jQuery Ajax.</p>
  
  <pre><code>&lt;?php  
  
  $con = mysqli_connect("localhost","root","password","test") or die("Some error occurred during connection " . mysqli_error($con));          
  $strSQL = "SELECT name,id from build";        
  $query = mysqli_query($con, $strSQL);
  $builder_json=array();
  $row_array=array();    
  while($result = mysqli_fetch_array($query))
  {
    // $builder_json[]=$result['name'].":".$result['id'];           
      $row_array['name'] = $result['name'];
      $row_array['id'] = $result['id'];
      array_push($builder_json[],$row_array);
  }
  echo json_encode($builder_json);
  mysqli_close($con);
  
  ?&gt;  
  </code></pre>
  
  <p>Now if the data fetched is like :</p>
  
  <p>Name - A,B  </p>
  
  <p>Id - 1,2  </p>
  
  <p>I want JSON string to be like - {"A":"1","B":"2"};
  With the above code I get NULL . What is the mistake I have done</p>
  
  <p></p>