Hello, how can I output from the database and display all this data outside the while zone?
There are 52456 lines in the database, you need to output everything and display it in a block, which is located behind while.
$usersfriendsmini = mysql_query("SELECT * FROM users WHERE (id='$friendusmini[idUser]' OR id='$friendusmini[idFriend]') AND id not like '%$_GET[id]%'"); while ($userfriendmini = mysql_fetch_array($usersfriendsmini)) { if ($userfriendmini[avatar] == '0') { $userfriendminiav = 'user.png'; } else { $userfriendminiav = "avatars/".$userfriendmini[avatar]; } $friendbl = "<a href='/profile/".$userfriendmini[id]."/'><img src='/images/".$userfriendminiav."' title='".$userfriendmini[surname]." ".$userfriendmini[name]."' class='avatar'></a>"; } <div class='test'><?php echo $friendbl; ?></div>
The problem is precisely that it does not display everything, but only one record, or rather the first one, which is displayed. I need to get everything out.
Tried without while, but without while it is only 1 record and displays ...
I think the problem is due to the fact that it is in a variable, since the variable grabs the first record and outputs only it. Maybe you can somehow replace it?