Take a look at [man]parse_url/man, if you have the URL as a string.

If you are talking about accessing the variable from the query string, then use $_GET['text'].

    Write a Reply...