Boucle mystérieuse
Posté : 18 janv. 2008, 16:51
$requete = mysql_query("SELECT Photo1,Photo2,Photo3,Photo4
FROM Annonce;");
$cpt=1;
while($champ = mysql_fetch_array($requete) and $cpt!=4)
{
echo"$cpt<br>";
$photo.$cpt=$champ["Photo$cpt"];
echo"nom:$photo$cpt<br>";
if($photo.$cpt=="non_disponible.gif")
{
$cpt++;
}
}
Ca m'affiche :1
nom:63532800 1200590473.jpeg
Le boucle s'arrete à la premiere image, je ne comprend pas pourquoi!!!!
Auriez vous une réponse logique amon probléme????