I am trying to create a function that will query a database and output all the results from the array. For some reason it is only displaying one result.
here is the function
function reguser_list() {
$query = mysql_query("SELECT `user_name` FROM `users` WHERE `active` = 1");
$reguser_names = mysql_fetch_assoc($query);
$list_names = implode(', ', $reguser_names);
echo $reguser_names;
}
there are currently 2 users in the database that are active but this only display one name how can I get it to display both?
- ' . implode('
', $row) . '
';` – Zach Starnes Mar 31 '13 at 01:36