PHP Last Array Key Issue
<p>I have this simple code for pasting images from a directory, I've sorted them into an array but the problem I can't seem to work out is how to get the last array to be different.</p>

<p><strong>This is my code so far:</strong></p>

<pre><code>foreach($images as $image){
echo("{image : '$image'}, ");
}
</code></pre>

<p>I'm looking to keep print the single items in the array but on the <strong>last</strong> one I'd like to <strong>not have the comma</strong>.</p>

<p>Any help would be great,</p>

<p>Thanks!</p>
