i want to take a url like
http://www.domain.com/theimage.jpg
and put theimage.jpg into a variable.
thanks for any help/advice.
> how could i strip the file name plus extension from a URL?
>
> i want to take a url like
>
> http://www.domain.com/theimage.jpg
>
> and put theimage.jpg into a variable.
I think basename() should do what you want. Check the docs to be sure.
JP
--
Sorry, <dev...@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
preg_match('/^.*\/(.*)/', $url, $patharr);
$patharr[1] would hold the filename.
Anyway, that's just academic since the basename() does exactly what you
need. I just put it here to keep my regex good.
"Jan Pieter Kunst" <dev...@cauce.org> wrote in message
news:devnull-7BFC44...@news1.news.xs4all.nl...