title: How to avoid adding a comma at the last row?
body: <p>I use the following code to add a comma <code>,</code> at the end of every filename. After this using <code>explode</code> i put the rows on an array.</p>
  
  <p>The images array if I echo it, it shows a.jpg,b.jpg,c.jpg, (please mind the last comma at the end of c.jpg)</p>
  
  <p>How can I avoid adding a comma to the last found row?</p>
  
  <pre><code>&lt;?php       
   while($image = mysql_fetch_array($images)) { 
   $images_path .= $image['FILE_NAME'].',';
  }
  
  $images_array = explode(",", $images_path);
  ?&gt;
  </code></pre>