Simple array order problem , need help

php simple array ordering problem :slight_smile:

hi all, who can help me with that : i need to order the values of the array after adding taxes (tva mean VAT), how to order the array before and after vat addition ?
can u give 2 axamples ?

thank u.

<?php

$s=0;
$salariers=array(‘a’=>25000,‘b’=>30000,‘c’=>40000,‘d’=>20000);
print_r ($salariers);

echo “<br>”;

foreach ($salariers as $a => $value) {

 for ($i=0;$i&lt; 4; $i++){

  $s=$s[$i]+$value;
  
  }

$calculatemax = array($i);
$i=$i+1;
$vat = (($value)*(.17));
$total = ($s+$vat);
echo ($a.$s.’ ‘.$vat.’ '.$total);
echo “<br>”;

}

?>
</body>
</html>