Fácil....
Código PHP:
<form name='tablas' method='post' action='prueba.php'>
<input type='text' name='columnas'>
<input type='submit' value='Formar Tabla'>
</form>
<?
echo '<table>';
echo '<tr>';
for ($i=0;$i<=$_POST[columnas];$i++)
{
echo '<td>{$i}</td>';
}
echo '</tr>';
echo '</table>';
?>