Bonjour,
j'ai ce code :
Code PHP :
<?php
$valeurs = "13;5;7";
$coeff = "2;5;1";
$tab3 = explode(';', $valeurs);
$tab4 = explode(';', $coeff);
sort ($tab3);
print_r ($tab3);
echo "<br/>";
print_r ($tab4);
?>
Cela affiche :
Array ( [0] => 5 [1] => 7 [2] => 13 )
Array ( [0] => 1 [1] => 2 [2] => 5 )
Mais on voit que : $valeurs = "13;5;7"; et $coeff = "2;5;1";
donc 13 correspond à 2, 5 correspond a 5, 7 correspond a 1.
Comment afficher :
Array ( [0] => 5 [1] => 7 [2] => 13 )
Array ( [0] => 5 [1] => 1 [2] => 2 )
Merci