pero si ya se ha dicho muuuchas veces...
![Negando](http://static.forosdelweb.com/fdwtheme/images/smilies/negar.gif)
...
Código PHP:
<form method="post" action="<?=$_SERVER['PHP_SELF'] ?>">
Cantidad: <input name="cantidad" type="text" size="4">
<input type="submit" value="Generar">
</form>
<?php
if(isset($_POST['cantidad'])) {
echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">";
echo "<input type=\"hidden\" name=\"cantidad\" value=\"".$_POST['cantidad']."\">"; // solo para conservarlo
for($i=0; $i<$_POST['cantidad']; $i++) { // generamos los listbox
echo "<select name=\"select".$i."[]\" size=\"3\" multiple>";
for ($l='a'; $l<'e'; $l++) // generamos 4 opciones
echo "<option value=\"op$i$l\">Opción $i-$l</option>";
echo "</select> ";
}
echo "<input type=\"submit\" name=\"Submit\" value=\"Ver Resultados\">";
echo "</form>";
if(isset($_POST['Submit'])) {
for($i=0; $i<$_POST['cantidad']; $i++) {
///////////////////////////////////////////////
$indice="select".$i;
if(!isset($_POST["$indice"])) echo "No se recibieron elementos de la matríz $indice.<br>";
}
}
}
?>
... cero y van tres diferentes formas que he mencionado...