Say I have this URL http://www.google.com/search?hl=en&q=digitalpoint&btnG=Google+Search Now I want to extract what the user has searched for. I think I remember there being a function that takes the URL apart and stores this data in an array, but for the life of me I can't remember what that function was. I'm not asking for a regular expression, I could do that myself.
Come to think of it, with that function I'd still have to use a regular expression to get the q part. :/ I thought there was a function that also takes the query string apart.
You don't have to use regex if you don't want to. explode() et al can give you what you want as well, although with regex it would just be a quick one liner.