<?php
// --------------------------------------
// création du tableau à trois dimensions
// --------------------------------------
$Tab_Amort3D = array(
 1 => array(
  "Mensualité"=>array("Montant"=>2000,"Type"=>"AssComp"),
  "Amortissement"=>array("Montant"=>1000,"Pourcent"=>50)),
 2 => array(
  "Mensualité"=>array("Montant"=>1900,"Type"=>"AssComp"),
  "Amortissement"=>array("Montant"=>1100,"Pourcent"=>58)),
 3 => array(
  "Mensualité"=>array("Montant"=>1800,"Type"=>"AssComp"),
  "Amortissement"=>array("Montant"=>1200,"Pourcent"=>66)),
   );  
// --- foreach imbriquées ---
foreach ($Tab_Amort3D as $NumEcheance => $Tab_Amort_Mens)
{
  echo "Echéance = $NumEcheance\t";
  foreach ($Tab_Amort_Mens as $Type => $Tab_Type)
  {
    foreach ($Tab_Type as $clef => $valeur)
    {
     echo "$clef=$valeur\t";
    }
  }
  echo PHP_EOL;
}
?>
