Bonjour,

Je crée un tableau html pour afficher des produits dans une page, voici le code :

CODE
     <?php

 echo

     "<table width=\"100%\"  border=\"0\" cellspacing=\"2\" cellpadding=\"3\">

       <tr class=\"tableTitreCenter\">

         <td width=\"12%\">Qt&eacute; / </td>

         <td width=\"65%\" align=\"left\">Titre / Titel</td>

         <td width=\"12%\">Prix Pce </td>

         <td width=\"11%\">Prix total </td>

       </tr>";

 

for ($i=1; $i < 40; $i++) {



 $_SESSION['${qty.$i}'] = ${qty.$i};

 $_SESSION['${titre.$i}'] = ${titre.$i};

 $_SESSION['${prix.$i}'] = ${$d.$i};



 if (${$d.$i} == "gratuit") {$money = "";} else {$money = ".- Frs ";}

 $soustotal = (${qty.$i} * ${$d.$i});

 if ($soustotal == 0) {$soustotal = "gratuit";} else {$soustotal = (${qty.$i} * ${$d.$i}).".- Frs ";}

 if(${qty.$i} >0 )  {

 

 echo

 "<tr class=\"tableLinePubli\">

         <td>".${qty.$i}."</td>

         <td align=\"left\">".${titre.$i} ."</td>

         <td>". ${$d.$i}.$money. "</td>

         <td>".$soustotal."</td>

       </tr>";

 

 } $total = $total + (${qty.$i} * ${$d.$i});

   }

    echo  "<tr class=\"tableTitreCenter\">

         <td colspan=\"3\">Total</td>

         <td>".$total.".- Frs</td>

       </tr>

     </table>";

   ?>



Comment faire pour insérer ce tableau dans un mail qui sera envoyé par un formulaire. Au niveau de l'envoie d'un formulaire simple, il n'y a pas de problème mais je ne sais pas comment ajouter ce tableau !

Merci d'avance