Image name from URL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psaha
Forum Newbie
Posts: 16
Joined: Mon Oct 26, 2009 4:11 am

Image name from URL

Post by psaha »

I have $url=http://myname.com/files/image_1.jpg;
I want $image=string function ($url, 'last /');
becomes $image=image_1.jpg

The file name from the URL.
Thanks...
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Image name from URL

Post by requinix »

psaha
Forum Newbie
Posts: 16
Joined: Mon Oct 26, 2009 4:11 am

Re: Image name from URL

Post by psaha »

thanks for basename. I forgot the function.
Post Reply