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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.