title: PHP : Add Comma after every Word (Except Final)
body: <p>I've got a string (not an array, it's a load of words stored in one string) and I'd like to put a comma after every word, although not putting one after the last word. I've got;</p>
  
  <pre><code>echo str_replace(' ', ', ', $stilltodo); 
  </code></pre>
  
  <p>but that for some reason adds a space before the comma (and after too but that's right), and also one at the end too. How could I change it to work how I want.</p>
  
  <p><em>An Example of the 'base' String</em></p>
  
  <pre><code>French History Maths Physics Spanish Chemistry Biology English DT Maths History DT Spanish English French RS
  </code></pre>
  
  <p><em>An Example of the Current Output with the Code above</em></p>
  
  <pre><code>French , History , Maths , Physics , Spanish , Chemistry , Biology , English , DT , Maths , History , DT , Spanish , English , French , RS ,
  </code></pre>