problem in array $_POST
<p>i have this code it can go to <code>if(array_key_exists('p',$_POST))</code> but can't go to <code>if(isset($_POST['p'][$i]) &amp;&amp; $_POST['p'][$i]==$row[0])</code></p>

<p>i tried to <code>echo $_POST['p'][0]</code> in <code>if(array_key_exists('p',$_POST))</code> but it tells me 0 is undefined</p>

<p>i don't know my error.</p>

<pre><code>if(array_key_exists('update',$_POST)){
//somecode
echo"&lt;td&gt;&lt;input type='Checkbox' name='p[$i]'  value='$row[0]' unchecked onclick='openinput()'/&gt;&lt;/td&gt;";
if(array_key_exists('p',$_POST))
        {
        $result=mysql_query($query);        
        if($result)
        {
            $num=mysql_num_rows($result);
            if($num&gt;0)
            {
                if(isset($_POST['p'][$i]) &amp;&amp; $_POST['p'][$i]==$row[0])
                {
                    foreach($_POST['p'] as $key=&gt;$value)
                         {
                         //some code
                    }   
                }
            }
        }
}
}
</code></pre>
