Echo $_SERVER['REQUEST_URI']

Hi everyone,

please help me with the following. I’m echoing out $_SERVER[‘REQUEST_URI’], but I don’t want the complete URI. For example, if the $_SERVER[‘REQUEST_URI’] is

/somefolder/anotherfolder/languages/php

then I only need the content after anotherfolder/. In other words, I only need languages/php.

Is this possible?

Perhaps someone will know how to do this. Thanks a lot!

Yes.

http://php.net/manual/en/ref.strings.php

Use the appropriate string function(s) to find the location of what you are looking for then grab everything that follows it.

Hi cheesedude,

thank you for replying to my thread. The substr function does the trick.

Thanks!