title: foreach array values into a single string
body: <p>Im using PHP to output the category information from an RSS feed:</p>
  
  <pre><code>foreach(item_category()) as $category) { 
      $source = $category-&gt;cat_name; 
      echo $source.'.png';
  }
  </code></pre>
  
  <p>Where <code>item_category</code> is an array of category names. I then have a set of corresponding images I've like to display against each item.</p>
  
  <p>At the moment my output looks like this:</p>
  
  <pre><code>category1.pngcategory2.pngcategory3.png
  </code></pre>
  
  <p>but I need: </p>
  
  <pre><code>category1category2category3.png
  </code></pre>
  
  <p>How can I construct the correct file name with the single occurence of the file extension at the end of the string?</p>