Jump to content

Get last item in URL string


TheBigLebowski

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.