title: Two While Loops, Second Returns Empty Array?
body: <p>I'm experimenting with MySQLi and using the following code to check differences for how I should approach my array formatting/usage for <code>fetch_array(MYSQLI_ASSOC);</code></p>
  
  <p>here is my code: </p>
  
  <pre><code>include "Database.php"; 
  
  $ArrayQuery = $mysqli-&gt;query("SELECT * FROM accountinformation");
  
  
  while ($ArrayResults = $ArrayQuery-&gt;fetch_array(MYSQLI_ASSOC))
  {
      echo count($ArrayResults);
      echo "&lt;br&gt;";
  }
  echo "&lt;br&gt;&lt;br&gt;&lt;bR&gt;&lt;br&gt;";
      $Empty = array();
  while ($ArrayResult = $ArrayQuery-&gt;fetch_array(MYSQLI_ASSOC))
  {
      foreach ($ArrayResult AS $ArrayRes)
      {
          $Empty[] = $ArrayRes;
      }
  }
  
  print_r($Empty);
  </code></pre>
  
  <p>The problem is, that i'm using the same <code>Variable</code> for my while loop, the first one returns <code>3</code> then <code>3</code> Which is expected.</p>
  
  <p>But the problem is, with my second query; it returns a blank array</p>
  
  <p><code>array( )</code> when <code>print_r();</code></p>
  
  <p>and when I do: </p>
  
  <pre><code>while ($ArrayResult = $ArrayQuery-&gt;fetch_array(MYSQLI_ASSOC))
  {
      print_r($ArrayResult);
  }
  </code></pre>
  
  <p>For my Second while loop, it returns nothing for output. </p>
  
  <p>I have checked my variables <code>$ArrayResults</code> and <code>$ArrayResult</code> are not duplicates, they are in fact unique.</p>
  
  <p>Why is my second while loop returning nothing when my first one is working?</p>
  
  <p><strong>Update</strong></p>
  
  <p>When I produce a second query into the mixture with a different starting variable: </p>
  
  <pre><code>$ArrayQuer = $mysqli-&gt;query("SELECT * FROM accountinformation");
  </code></pre>
  
  <p>and modify my second while loop: </p>
  
  <pre><code>while ($ArrayResult = $ArrayQuer-&gt;fetch_array(MYSQLI_ASSOC))
  {
      print_r($ArrayResult);
  }
  </code></pre>
  
  <p>I get the expected output? So is it a case of MySQLi not allowing the same parameters to be used twice throughout the script?</p>