I have a string variable that consists of a url. Basically it is “http://www.anydomain.com/anypage.htm” The domain will be varied in length and the amount of “/”'s will vary as well.
So the string could be any of the folowing:
What I need to do is strip out everything except the stuff after the last “/” … basically leaving me with the page name.
Is preg_replace the easiest way to do this?
If so, what would the code look like… preg_replace looks pretty compliacated.