Validate vars in URL
<p>If I know what vars I can have in my URL how do I validate my URL and ignore the ones that aren't on my list?</p>

<p>I suppose I will have all 'good' vars in an array</p>

<pre><code>$good = array("name", "car", "year", "color");
</code></pre>

<p>Then I need to get the request URL, then break it apart looking for QUERY elements and loop those against my $good array, strip the ones that don't belong and process request. Seems like a good plan in theory. Or is there a better plan? If it's OK, how do I do all that? </p>

<pre><code>$url = http://mydomain.com/?car=1&amp;color=red&amp;bad=asdasd
</code></pre>
