title: PHP Add comma to every item but last one
body: <p>I have a loop like</p>
  
  <pre><code>foreach ($_GET as $name =&gt; $value) {
      echo "$value\n";
  }
  </code></pre>
  
  <p>And I want to add a comma in between each item so it ends up like this.</p>
  
  <pre><code>var1, var2, var3
  </code></pre>
  
  <p>Since I am using <code>foreach</code> I have no way to tell what iteration number I am on.</p>
  
  <p>How could I do that?</p>