title: mysqli_fetch_array returning less results than expected
body: <p>I'm using the code below to return and echo an array. If I define <code>mysqli_fetch_array($results, MYSQLI_BOTH)</code> then my array is truncated by one result. The 1st result in the array drops off the list. If I remove the <code>MYSQLI_BOTH</code> then I get the results that I expect, but my hosting company (Dreamhost) throws this error:</p>
  
  <blockquote>
    <p>Warning: mysqli_fetch_array() [function.mysqli-fetch-array]: The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in /blah/blah/blah.co.uk/index.php on line 14</p>
  </blockquote>
  
  <p>What I really want is to use <code>mysqli_fetch_array($results, 0)</code> so that I catch all of the results, but do not get this error message.</p>
  
  <p>CODE: </p>
  
  <pre><code>$dbc = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die('This is the die connect error');
  
  $query = "SELECT DISTINCT continent FROM tour";
  $result = mysqli_query($dbc, $query) or die('This is the die query error');
  
  $row = mysqli_fetch_array($result, MYSQLI_BOTH); // was ($result, 0) to start at 0, now in error, starts at 1 missing results
  
  while($row = mysqli_fetch_array($result)) {
      echo '&lt;a href="country.php?continent=' . $row['continent'] . '"&gt;' . $row['continent'] . "&lt;/a&gt;&lt;br /&gt;\n"; 
  }
  
  mysqli_close($dbc);
  </code></pre>