Bonjour,
j'ai connu la boucle de tri en langage VB mais en php j'ai du mal à la programmer
voici le code actuel mais il est pas complet:
<?php
$i=$_SESSION['nbtxt'];
$tableau=array();//création de mon tableau
for($k=1;$k<=$i;$k++)
{
$nb=$_POST["txt_index($k)"];
echo'<table>';
echo'<tr>';
echo'<th>'.$nb.'</th>';
echo'</tr>';
echo'</table>';
array_push($tableau,$nb);//alimentation de mon tableau
}
$tableau2=array();//création de mon 2ème tableau
for ($k=1;$k<=$i-1;$k++)
{
$min=$tableau[0];
if ($min >= $tableau[$k])
{array_push($tableau2,$tableau[$k]);
array_push($tableau2,$min);
}
}
y a-t-il qq1 qui pourrait m'aider à mieux comprendre et à le finir?
Configuration: Windows Vista
Firefox 3.0.7