Multiple input fields from PHP table
Try this:

&lt;?php
if(isset($_POST['submit'])){
    foreach ($_POST as $k=&gt;$v){
        // use even and odd count to differentiate TRP and CPP
        if ($k != "submit") {
            // split the form input on _
            $input = explode("_", $k);
            echo "&lt;BR&gt;Region: " . $input[0];
            echo "&lt;BR&gt;Date: " . $input[2];
            if($input[1] == "value1"){
                echo "&lt;BR&gt;Value 1: " . $v;
            }
            elseif($input[1] == "value2"){
                 echo "&lt;BR&gt;Value 2: " . $v;
            }
         }
        echo "&lt;br/&gt;";
     }
}
else {
    $date_array = Array("01/01/2012", "01/08/2012", "01/15/2012");
    $region_array = Array("NYC", "DC");
?&gt;
    &lt;form name="test_form" id="test_form" method="post" action=""&gt;
        &lt;table border="1"&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;/td&gt;
&lt;?php
                foreach ($date_array as $date){
                    echo "&lt;td&gt;".$date."&lt;/td&gt;";
                }
?&gt;
            &lt;/tr&gt;
&lt;?php
        foreach ($region_array as $region){
            echo "&lt;tr&gt;";
            echo "&lt;td&gt;".$region."&lt;/td&gt;";
            foreach ($date_array as $date){
                echo '&lt;td&gt;&lt;input type="text" name='.$region."_value1_".$date.'&gt;&lt;input type="text" name='.$region."_value2_".$date.'&gt;&lt;/td&gt;';
            }
            echo "&lt;/tr&gt;";
        }
?&gt;
        &lt;/table&gt;
    &lt;input type="submit" name="submit"&gt;
&lt;/form&gt;
&lt;?php
}
?&gt;