Debes usar for anidados.
Código (php) [Seleccionar]
$dias=30;
$pisos=10;
echo "<table width='300' border='1' cellspacing='0' cellpadding='0'>";
for($i=1;$i<=$pisos;$i++){
echo "<tr>";
for($j=1;$j<=$dias;$j++){
echo "<td>Día ".$j."</td>";
}
echo "</tr>";
}
echo "</table>";