POST数据作为数组

Following is my form:

<form method="POST" action="../controller/assignsubteacher.php">
  <table class="table table-bordered table-striped table-hover table-condensed" id="coursedetail" >
    <thead>
      <tr>
        <th>Sub Id</th>
        <th>Sub Name</th>
        <th>Teacher Name</th>
      </tr>
    </thead>
    <tbody id="table_ajax">

    </tbody>
    <tfoot>
      <tr>
        <th>Sub Id</th>
        <th>Sub Name</th>
        <th>Teacher Name</th>
      </tr>
    </tfoot>
  </table>
  <div class="col-md-2">
    <button type="submit" class="btn btn-primary btn-block btn-flat">Submit</button>
  </div>
</form>

and table in the form is populated by following response:

while($row=mysqli_fetch_array($result))
    {
        $list='<select id="teacher" name="teacher'.$COUNT.'" class="form-control">
            <option value = "UNKNOWN" selected="select">-SELECT-</option>';
        $get_teacher="select Regno,Name from Student_Registration inner join Login on Regno=Uname where Id=2;";
        $teacher_list = mysqli_query($con,$get_teacher);
        while($row_Teacher=mysqli_fetch_array($teacher_list))
        {
            $list.='<option value="'.$row_Teacher['Regno'].'">'.$row_Teacher['Name'].'</options>';
        }
        $list.='</select>';
        $Subject_ID=$row["SubId"].'<input type="hidden" name="SubId'.$COUNT.'" value="'.$row["SubId"].'">';
        //$Subject_Name=$row["Subject_Name"].'<input type="hidden" name="SubName'.$COUNT.'" value="'.$row["Subject_Name"].'">';
        $Subject_Name=$row["Subject_Name"];

        $tr.='<tr>
                <td>'.$Subject_ID.'</td>
                <td>'.$Subject_Name.'</td>
                <td>'.$list.'</td>
                </tr>';
        $COUNT=$COUNT+1;
    }
    echo $tr;

I am not able to use the posted data to insert in to database. Is there any way i can send the data as Array and retrieve it. following is the AJAX to populate the table body:

xhr.onreadystatechange = function() 
          {
            if (this.readyState == 4 && this.status == 200) 
            {
              console.log(xhr.responseText);
              Table.innerHTML=xhr.responseText;
              }
          };

I was thinking of using foreach to insert data in the POST controller, but have no idea how to achieve that. any help would be appreciated.

Use SQL insert query to do so.

while($row=mysqli_fetch_array($result))
{
    $list='<select id="teacher" name="teacher'.$COUNT.'" class="form-control">
        <option value = "UNKNOWN" selected="select">-SELECT-</option>';
    $get_teacher="select Regno,Name from Student_Registration inner join Login on Regno=Uname where Id=2;";
    $teacher_list = mysqli_query($con,$get_teacher);
    while($row_Teacher=mysqli_fetch_array($teacher_list))
    {
        $list.='<option value="'.$row_Teacher['Regno'].'">'.$row_Teacher['Name'].'</options>';
    }
    $list.='</select>';
    $Subject_ID=$row["SubId"].'<input type="hidden" name="SubId'.$COUNT.'" value="'.$row["SubId"].'">';
    //$Subject_Name=$row["Subject_Name"].'<input type="hidden" name="SubName'.$COUNT.'" value="'.$row["Subject_Name"].'">';
    $Subject_Name=$row["Subject_Name"];

    $tr.='<tr>
            <td>'.$Subject_ID.'</td>
            <td>'.$Subject_Name.'</td>
            <td>'.$list.'</td>
            </tr>';
    $COUNT=$COUNT+1;
    $sql = "INSERT INTO `table` (column1, column2, column3) VALUES ($list, $subject_name, $tr)";
    //Replace columns & table name
    if(mysqli_query($con, $sql)) {
         echo "Inserted";
    }
}
echo $tr;