from.php
<form method="POST" action="to.php">
  <textarea rows="2" name="t" cols="20">1
2
3</textarea><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>to.php
<?$d=explode("\n",$t);
for($i=0;$i<count($d);$i++)
{
echo $d[$i];
}?>