Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

printing query result twice

Codes here !

Moderators: macek, egami, gesf

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];
}
User avatar
Joan Garnet
Moderator
Moderator
 
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Return to mySQL & php coding

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.