TheBigLebowski Posted June 14, 2007 Share Posted June 14, 2007 I realize how elementary this is, I apologize. Maybe that's why I can't find the right answer. I've tried everything from EXPLODEing the string to SUBSTR_REPLACE. Can anyone tell me how to just get the last item in a URL string? Like turn this: /mydirectory/myimg.jpg into this: myimg.jpg Thanks very much Link to comment https://forums.phpfreaks.com/topic/55629-get-last-item-in-url-string/ Share on other sites More sharing options...
Orio Posted June 14, 2007 Share Posted June 14, 2007 Try basename(). Orio. Link to comment https://forums.phpfreaks.com/topic/55629-get-last-item-in-url-string/#findComment-274883 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.