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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.