This is a quick PHP technique to extract the filename from a url or path. Just pass a string or url through the basename function and only the filename will be returned. The second argument for this function is for the suffix, so if you set the second argument to ".php", then the file name will be returned without the file extension.
