Salut
J'ai essayé avec ses coudes source mais j'ai rien reçu comme affichage.
J'ai fait 2 pages une HTML
<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div align="center">
<p><font color="#CC6666" size="+2"><strong>Triangle de pascal<br></strong></font>
</p>
</div>
<form name="form1" method="post" action=".\Triangle1.php">
<table width="40%">
<tr>
<td width="37%"><strong>Inserer un nombre:</strong></td>
<td width="63%"><input name="n" type="text" id="n"></td>
</tr>
</table>
</form>
</body>
</html>
Et l'autre pour le scriptPHP
<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$n = $_POST["n"]; // Nombre de lignes désirées
$c = array(array(1));
for($i=1;$i<=$n;$i++)
{
$c[$i] = array(1);
for($j=1;$j<=$i;$j++)
$c[$i][$j] = $c[$i-1][$j-1] + (isset($c[$i-1][$j]) ? $c[$i-1][$j] : 0);
}
?>
</body>
</html>