Extract a portion of a url
<p>I am trying to extract a portion of a URL using regex.</p>

<p>An example of my url would be:</p>

<pre><code>http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=food
</code></pre>

<p>Using php, how could I extract the data in the q variable or the sourceid variable?</p>
