Lionches
.
- Jan 17, 2012
- 649
- 166
Hello,
I've been trying to figure out how to code a script that will get all the user's names from the database, and output then into the container. This is what I have so far;
I want it to return a comma for every user, but it only shows this, even when I have more than one VIP user;
I want it to be something like this;
Any help?
I've been trying to figure out how to code a script that will get all the user's names from the database, and output then into the container. This is what I have so far;
PHP:
public static function getVipList()
{
global $db;
$users = $db->query("SELECT username FROM users WHERE rank = 2 ORDER BY id");
while($user = $users->fetch_assoc())
{
$get = $user['username'];
return ($putcomma = implode(", ", (array)$get));
}
}
You must be registered for see links
I want it to be something like this;
You must be registered for see links
Any help?