My URL's can be absolute or relative:
$rel = "date/album/001.jpg";
$abs = "http://www.site.com/date/album/image.jpg";
function getFilename($url) {
$imgName = explode("/", $url);
$imgName = $imgName[count($imgName) - 1];
echo $imgName;
}
There must be a faster way to do this right? Maybe a reg expression? But that's Chinese to me..