I have seen on most online newspaper websites that when i click on a headline link, e.g. two thieves caught red handed
, it normally opens a url like this: www.example.co.uk/news/two-thieves-caught-red-handed
.
How do I deal with this url in php code, so that I can only pick the last part in the url. e.g. two-thieves-caught-red-handed
. After that I want to work with this string.
I know how to deal with GET
parameters like "www.example.co.uk/news/headline=two thieves caught red handed".
But I do not want to do it that way. Could you show me another way.