If I have a URL look like this:
http://wwww.example/test1/test2/test3/
How can I retrieve string test3 from the url above?
If I have a URL look like this:
http://wwww.example/test1/test2/test3/
How can I retrieve string test3 from the url above?
So basename() does exactly that.
$url = 'http://www.example/test1/test2/test3/';
echo basename($url); // returns : test3;