title: mysqli comma separator in result list
body: <p>I have the folowing query:</p>
  
  <pre><code>$query = $db-&gt;query("SELECT name FROM table LIMIT 5");
  </code></pre>
  
  <p>I want to have a list of these names either with the comma or as a list one above another.</p>
  
  <pre><code>while ($result = $query -&gt;fetch_object()) {
  echo '.$result-&gt;name.';
  }
  </code></pre>
  
  <p>How can I do that.</p>
  
  <p>Thanks</p>