title: Separating $item with commas
body: <pre><code>&lt;table&gt;
  &lt;tr&gt;
  &lt;th&gt;Products&lt;/th&gt;
  &lt;/tr&gt;
  &lt;td&gt;
                      &lt;? 
                      foreach ($invoice-&gt;cart-&gt;items as $id =&gt; $item) { 
                     ?&gt;
                      &lt;?=$item-&gt;getName()?&gt;
                     &lt;?
                          }
                      ?&gt;
                      &lt;/td&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>If I have 4 Products then I want to separate with coma ?</p>
  
  <p>For example if I have 4 Products:-</p>
  
  <pre><code>Rubber Ducky™ Gold fish &amp; Tank David Byrne and My Fair Lady - MP3 file download (0 MB)
  </code></pre>
  
  <p>I want the output with coma like this</p>
  
  <pre><code>Rubber Ducky™, Gold fish &amp; Tank, David Byrne, My Fair Lady MP3 file download (0 MB)
  </code></pre>
  
  <p>how it is possible with PHP?</p>