printing query result twice

Codes here !

Moderators: macek, egami, gesf

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Sat Jan 18, 2003 6:13 am

Try this one:

Code: Select all

$temp = mysql_query("SELECT BLA BLA BLA")or die(mysql_error());
while($row = mysql_fetch_array($temp)
{
   echo $my_array[] = $row["whatever"]."<br>";
}
for ($i=0;$i<sizeof($my_array);$i++){
   echo $my_array[$i];
}

Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 3 guests