如何取出checkbox的值 会的多帮帮我 我是新手

<form id="form1" name="form1" method="post" action="a.php">
  <table width="496" border="0" cellspacing="0" cellpadding="0">
   <?php if ($row = mysql_fetch_array($result)) {
do {
?>
    <tr>
      <td><input type="checkbox" name="ch[]" value="<?=$row["id"];?>" />
      <input type="submit" name="Submit" value="提交" /></td>
    </tr>
<?php
    }
while($row = mysql_fetch_array($result));
    }
     else {print "对不起,数据库为空。";
     }
    ?>

  </table>
</form>

========================下面是a.php===主要是取出上面赋的ID===================================

<?php
$ch=$_POST['ch'];

       foreach($ch as $a)
      {
         $p_t1=$ch[$a];
       echo $p_t1;   //不知道怎么样才能取出上面赋的ID 帮忙啊 大侠   就是这个ID "<?=$row["id"];?>""
       }
     ?>