PHP Cutting the last few characters of a filename
<p>I am retrieving file locations and names from a database, the are in this format</p>

<p><a href="http://domain.com/subdir/etc/etc/etc/picimage-niceone_Main-150x150.jpg" rel="nofollow">http://domain.com/subdir/etc/etc/etc/picimage-niceone_Main-150x150.jpg</a></p>

<p>They are all dynamic, so there are hundreds of them all with different names, but one thing is constant is the last - and then the file dimensions.</p>

<p>What i need to do is strip everything after the last - so it turns into the following.</p>

<p><a href="http://domain.com/subdir/etc/etc/etc/picimage-niceone_Main.jpg" rel="nofollow">http://domain.com/subdir/etc/etc/etc/picimage-niceone_Main.jpg</a></p>

<p>Any help would be awesome.</p>

<p>Cheers,</p>
