Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/08/2011, 07:49
jonnyalexbh
 
Fecha de Ingreso: marzo-2011
Mensajes: 26
Antigüedad: 13 años, 1 mes
Puntos: 0
Exclamación Array bidimensional

Buenos dias

tengo un problema con un array bidemensional cuando voy a mostrarlo y selecciono de un chekbox los que quiero mostrar las cantidades de este no concuerdan

Ej:

Código PHP:
<form id="form1" name="form1" method="post" action="untitled1.php">
  <table width="200" border="1" align="center">
    <tr>
      <td>Ver</td>
      <td>Nombre</td>
      <td>Cantidad</td>
    </tr>
 <?php
 
for($i=0$i<=2$i++)
 {
 
?>
    <tr>
      <td><input type="checkbox" name="ckb_sel[]" id="ckb_sel[]" value="<?php echo $i?>" /></td>
      <td>
      <input type="text" name="textfield" id="textfield" /></td>
      <td>
      <input type="text" name="txt_can[]" id="txt_can[]" value="<?php echo $i?>" /></td>
    </tr>
 <?php
 
}
 
?>
  </table><br />
  <div align="center">
    <input type="submit" name="btn_guardar" id="btn_guardar" value="Guardar" />
  </div>
</form>
Y lo recibo de la siguiente manera

Código PHP:
           for($dor=0$dor sizeof($ckb_sel); $dor++)
           {
    
                   echo 
$ckb_sel[$dor]."-".$txt_can[$dor]."<br />";
           } 
Pero las cantidades de los items no son las correctas...