title: Exclude last comma in php array
body: <p>I have a simple database connection:</p>
  
  <pre><code>$rowdata = mysql_query("SELECT * FROM table_names");
          while($row = mysql_fetch_array($rowdata)) {
          echo "".$row['name'].",";
          }
  </code></pre>
  
  <p>I would like it to print out:</p>
  
  <p>Adam, Sophia, Tom, Brian</p>
  
  <p>instead of:</p>
  
  <p>Adam, Sophia, Tom, Brian,</p>
  
  <p>How do I exclude the last comma in the best way?</p>