a)FILAS :2 ; COLUMNAS: 5
RESULTADO:
12345
678910
b)FILAS 4; COLUMNAS :10
12345678910
11121314151617181920
21222324252627282930
31323334353637383940
Acà les dejo el còdigo ojala me puedan ayudar con este problemita, saludos queridos maestros.
<body>
<?
$fil=$_POST["fil"];
$col=$_POST["col"];
?>
<form name="form1" method="post" action="matrix.php">
<table width="58%" border="1" align="center" bordercolor="#FFFFFF" bgcolor="#0000FF">
<tr>
<td width="8%" bgcolor="#0000FF"><div align="center">Filas</div></td>
<td width="26%"><input name="fil" type="text" id="fil" value="<?echo $fil?>"></td>
<td width="11%" bgcolor="#0000CC">columnas</td>
<td width="26%"><input name="col" type="text" id="col" value="<?echo $col?>"></td>
<td width="29%"><input name="calcular" type="submit" id="calcular" value="calcular"></td>
</tr>
</table>
<table border=1>
<?
$c=1;
while($c <= $col) {
echo "<td>". $c ."</td>\n";
if($c == $cv) {
echo "<tr>";
$num = $c+round($col/$fil);
}
if($num) { $cv = $num; } else { $cv = round($col/$fil); }
$c++;
}
?>
</table>
</form>
</body>
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)