Jump to content

[SOLVED] Adding data to array, in While loop


DeanWhitehouse

Recommended Posts

I have a while loop for mysql_fetch_assoc(); , and i want to put a certain thing into an array should i do it this way or will mysql_fetch_array(); do it?

$sqk = "SELECT * FROM guestbook";
$sqk = mysql_query($sqk);
$arr = array();
/*while($wir = mysql_fetch_assoc($sqk))
{
$arr .= $wir['en_avatar'];
}*/
$arr = mysql_fetch_array($sqk);
//echo $arr;
echo $arr['1'];

 

Edit: I need to put all the avatar images into one array , to make my image preloader

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.