title: While loop showing only one result
body: <p>I want to show string outside while loop, but it only shows one result.</p>
  
  <pre><code>while($row = $result-&gt;fetch_assoc()) {
      $myarr = array();
  }
  echo $myarr;
  </code></pre>
  
  <p>This shows only one result but I need all the results outside the while loop.
  Could you please help me how is this possible?</p>