J'aimerai comprendre pourquoi un bon code A placé avant un autre B fait bugguer ce dernier (B). Mais si ce code A est placé après le code B, ça ne buggue pas.
Voici c'est 2 codes:
Code A:
<?php
$rating_tableName = 'ratings';
$id=$ids;
$q="SELECT ratings.total_votes, ratings.total_value FROM $rating_tableName WHERE ratings.id=$id";
$r=mysql_query($q);
if(!$r) echo mysql_error();
while($row=mysql_fetch_array($r))
{
$v=$row['total_votes'];
$tv=$row['total_value'];
$rat=$tv/$v;
}
$j=$ids;
$id=$ids;
echo'<div class="product">
<div id="rating_'.$id.'" class="ratings">';
for($k=1;$k<6;$k++){
if($rat+0.5>$k)$class="star_".$k." ratings_stars ratings_vote";
else $class="star_".$k." ratings_stars ratings_blank";
echo '<div class="'.$class.'"></div>'; } echo' <div class="total_votes"><p class="voted"> '.@number_format($rat).'/5 -'.$v. ' vote(s)
</div>
</div></div>';
?>
Code B:
<?php echo"$row[prenom] ";echo"$row[nom]";?>
Merci.