function yanghui($line)
{
echo "
";
for($i=1;$i{
echo "";
for($j=1;$j{
$yh[$i][1]=1;
if ($i==$j) $yh[$i][$j]=1;
else $yh[$i][$j]=$yh[$i-1][$j-1]+$yh[$i-1][$j];
echo " "; echo $yh[$i][$j]; echo " | ";
}
echo "
";
}
echo "
";
}
if($_POST['submit']) yanghui($_POST['givenlines']);
?>