Voici mon problème :
Je suis en train de créer un panier virtuel pour un E.commerce avec une partie des codes trouvés dans un script téléchargé sur le net que je tente de personnaliser. Et là, je suis concé
Je n'arrive pas à formater l'affichage de mon prix article sur la ligne --> echo "<td width=\"53\" align=\"right\">".htmlspecialchars($_SESSION['panier']['prixProduit'][$i])."</td>"; <--
J'ai lu qu'il fallait insérer un format_number mais je ne sais pas comment ni où le placer,
merci de votre aide. Voici le script :
<?php
if (creationPanier())
{
$nbArticles=count($_SESSION['panier']['libelleProduit']);
if ($nbArticles <= 0)
echo "<tr height=\"50\"><td colspan=\"6\" align=center class=Style13 >Votre panier est vide ... </td></tr><tr height=\"30\"><td colspan=\"6\"> </td>";
else
{
for ($i=0 ;$i < $nbArticles ; $i++)
{
echo "<table width=\"800\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=Style10>";
echo "<tr>";
echo "<td width=\"243\"></td>";
echo "<td width=\"120\" valign=top class=Style\"14\">".htmlspecialchars($_SESSION['panier']['libelleFamille'][$i])."</ td>";
echo "<td width=\"305\" valign=top>".htmlspecialchars($_SESSION['panier']['libelleProduit'][$i])."</ td>";
echo "<td width=\"36\" align=\"center\"><input type=\"text\" size=\"1\" background-color=#B6370C name=\"QteArticle[]\" value=\"".htmlspecialchars($_SESSION['panier']['qteProduit'][$i])."\" onChange=\"Submit\"/></td>";
echo "<td width=\"53\" align=\"right\">".htmlspecialchars($_SESSION['panier']['prixProduit'][$i])."</td>";
echo "<td width=\"43\"align=\"center\"><a href=\"".htmlspecialchars("panier.php?action=suppression&l=".rawurlencode($_SESSION['panier']['libelleProduit'][$i]))."\"><img src=\"panier/supr.jpg\"></a></td>";
echo "</tr>";
echo "</table>";
}
}
echo "<table width=\"800\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"Style10\">";
echo "<tr>";
echo "<td colspan=\"4\" align=\"right\" class=\"Style11\" >______________________________________________________________</td>";
echo "</tr>";
echo "<tr>";
echo "<td> </td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"298\"> </td>";
echo "<td width=\"274\" align=\"right\"><input type=image src=\"panier/recalcul.jpg\" onChange=\"Submit\" /></td>";
echo "<td width=\"150\" align=\"right\">Montant total : </td>";
echo "<td width=\"118\" align=\"center\">".MontantGlobal();
echo " EUR";
echo "</td>";
echo "<input type=\"hidden\" name=\"action\" value=\"refresh\"/>";
echo "</tr>";
echo "</table>";
echo "<table width=\"800\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"Style10\">";
echo "<tr>";
echo "<td width=\"243\" ></td>";
echo "<td colspan=\"5\" align=\"left\" class=\"Style11\"> ______________________________________________________________ </td>";
echo "</tr>";
echo "</table>";
}
?>