how to get index's value from $_POST using foreach
<p>I want to know the correct code to detect only numerical $_POST fields coming from the form.</p>

<p>Please correct my code.</p>

<pre><code>foreach ($_POST as $vals)
{   
if (is_numeric($vals))
{
    if (is_numeric($vals[$i]) &amp;&amp; ($vals[$i]!="0"))
    {
    //do something
}   

}
</code></pre>
