how to count the values inside HTTP_SERVER_VARS['QUERY_STRING']
<p>I have defined a var to be used in my forms and it grabs all the parameters automatically so that i dont have to check for them. problem is how do i count the values inside 
HTTP_SERVER_VARS['QUERY_STRING'] ?</p>

<p>when i do var_dump i see string(0) "" when I have no params but when i do it beings string(#) where # is the num of params. I have tried count() but it shows a value of 1 no matter how many params i put.</p>

<p>this is what i have set up.</p>

<pre><code>define('PHP_SELF', htmlentities($_SERVER['PHP_SELF']) . "?". $HTTP_SERVER_VARS['QUERY_STRING']);
</code></pre>

<p>this is how i use it.</p>

<pre><code>&lt;form method="POST" action="&lt;?= PHP_SELF ?&gt;"&gt;
....
&lt;/form&gt;
</code></pre>

<p>my problem is even if there are no params the action looks like /page.php? and I want to check against the params so if no params are set then i can take out the ? mark. How would i do this?</p>

<p>let me know you understand what im trying to say.</p>
