Vous etes deux à me donner la même reponse, donc ça doit etre vraie. Sauf que ça marche pas...
Je vous colle un morceau plus long du script pour le mettre dans son contexte.
<?
$html = "
<table width=100% cellspacing=0px > <tr><td width=18px><img src=images/ban_hg.jpg ></td><td><img src=images/ban_hc.gif></td><td><a href="javascript:window.history.go(-1)"><img src=images/ban_hd.gif></a></td></tr></table>
<table width=100% cellspacing=0px > <tr style=background-color:black height=20px><td width=24px><img src=images/coin_hg.jpg></td><td ><font color=white>Intitulé du produit</font></td><td ><font color=white >Ref</td><td ><font color=white>Qte</font></td><td><font color=white>Prix HT</font></td><td><font color=white>Modif/Supp</font></td><td style=background-color:black width=18px><img src=images/coin_hd.jpg></td></tr>
";
$emptycart=true;
$i=0;
$totalp=0;
foreach ($tmp as $key=>$value) {
$caddy=array();
$caddy=explode(",", $value);
$html2 = "<form name='test' method='post'>";
//echo $i;
if ($i%2==0 || $i==0) {
$html2 .= "<tr style='background-color:white;'>";}
else { $html2 .= "<tr style='background-color:#f1e4ee;'>";}
$html2.="<td style= 'border-left: solid;
'> </td><td style= 'border-right: solid'>";
$pu = number_format($caddy[3], 2, ',', ' ');
$html2 .= $caddy[0]." <br>(prix unitaire ".$pu.") </td><td style= '
border-right: solid'>".$caddy[2]."</td>";
$html2 .= "<td style= 'border-right: solid'>";
if (!$mode) {
$totalp+=$caddy[1];
$html2 .= "