I have a site and I would need to get one pages URL with PHP. The URL might be something www.mydomain.com/thestringineed/ or it can www.mydomain.com/thestringineed?data=1 or it can be www.mydomain.com/ss/thestringineed
So it’s always the last string but I dont want to get anything after ?
You will use the parse_url function, then look at the path portion of the return.
like this: