Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/04/2017, 12:44
alvaro_trewhela
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problema con Variable

No entendí bien, buscas algo como esto?

Código PHP:
Ver original
  1. <html>
  2.     <head>
  3.     </head>
  4.     <body>
  5.         <form method="post">
  6.         <input type="checkbox" value="asddsadd" name="asd[]" /><br />
  7.         <input type="checkbox" value="aswewed" name="asd[]" /><br />
  8.         <input type="checkbox" value="adsadssd" name="asd[]" /><br />
  9.         <input type="checkbox" value="asqwqwqd" name="asd[]" /><br />
  10.         <input type="submit">
  11.         </form>
  12.         <?php
  13.         if($_POST["asd"] != null){
  14.         $count = sizeof($_POST["asd"]);
  15.             for($i=0;$i<$count;$i++){
  16.             echo "Valor Checkbox".($i+1).": ".$_POST["asd"][$i]."<br/>";
  17.             }
  18.         }
  19.         ?>
  20.     </body>
  21. </html>