title: How do I combine all elements in an array using comma?
body: <p>I know this question has with out any doubt been asked a whole lot of times. I though can seem to find a solution. So forgive me if it's way to simple.</p>
  
  <p>The question is how do access the end of a while loop.</p>
  
  <p>E.g.</p>
  
  <pre><code>    while($countByMonth = mysql_fetch_array($countByMonthSet)) { 
              $c = $countByMonth["COUNT(id)"];
              echo $c . "," ; 
          }
  </code></pre>
  
  <p>How do I manage separate each value of the while loop by a comma but of course I don't want the comma at the end of the value.</p>
  
  <p>In advance thank you very much for your help :)</p>