PHP not detecting empty POST variables
<p>I have the following array</p>

<pre><code>Array ( [productid] =&gt; 3
[newid] =&gt; 3
[name] =&gt; 
[description] =&gt; 
[price] =&gt; 
[onlinestock] =&gt; 
[weight] =&gt; 
[keywords] =&gt; 
[longdescription] =&gt; 
[graphic1] =&gt; 89.jpeg 
[graphic2] =&gt; 
[parameter1] =&gt; 
[parameter2] =&gt; 
[category1id] =&gt; 101 
[category2id] =&gt; 
[category3id] =&gt; 
[category4id] =&gt; 
[category5id] =&gt; 
[extra1] =&gt; 
[extra2] =&gt; 
[extra3] =&gt; 
[group1id] =&gt; 1575 
[groupprice1] =&gt; 0 
[group2id] =&gt; 1576 
[groupprice2] =&gt; 0 
[group3id] =&gt; 1577 
[groupprice3] =&gt; 0 
[group4id] =&gt; 1578 
[groupprice4] =&gt; 0 
[group5id] =&gt; 1579 
[groupprice5] =&gt; 0 
</code></pre>

<p>I'm doing the following to check for empty values</p>

<pre><code> if (empty($_REQUEST["category1id"])){ 
                $_REQUEST["category1id"] = 0;
        }else if (empty($_REQUEST["category2id"])){
                $_REQUEST["category2id"] = 0;
        }else if (empty($_REQUEST["category3id"])){
                $_REQUEST["category3id"] = 0;
        }else if (empty($_REQUEST["category4id"])){
                $_REQUEST["category4id"] = 0;
        }else if (empty($_REQUEST["category5id"])){
                $_REQUEST["category5id"] = 0;
        }else if (empty($_REQUEST["price"])){
                $_REQUEST["price"] = 0;
        }else if (empty($_REQUEST["onlinestock"])){
                $_REQUEST["onlinestock"] = 0;
        }else if (empty($_REQUEST["weight"])){
                $_REQUEST["weight"] = 0;
        }
</code></pre>

<p>but somehow it's not detecting any of these values as empty? I'm not sure what this could be I tried $_REQUEST['category1id'] == "" and that also is not working. Any help would be appreciated</p>
