Hi
I’m new at PHP and I am having an issue with my loop. I have a mysql database that I am retrieving data from. I need to echo the information so that flash can read it. When I echo my array it displays my data but repeats the first row several times. Why is this? Here is the output from the echo:
numsx=381,474,646&numsx=381,474,646&numsx=318,432,626
see the repeat in data.
[code=php]
$houseID = 74420665;
$id_query = mysql_query(“SELECT colors, xvalues, yvalues FROM t_neonlights WHERE houseID='{$houseID} ‘”) or print mysql_error();
while ($row = mysql_fetch_array($id_query, MYSQL_ASSOC)) {
$i++;
$vars .=”numsx=”. $row[“xvalues”]. “&”;
echo $vars;
}
Thanks for your help.