<?php include '../core/connection_details.php'; mysql_connect("$db_host","$db_username","$db_password"); mysql_select_db("$db_database"); $loggedin = mysql_query("SELECT `username`, `displayname`, `logged_in` FROM members WHERE logged_in='1'"); while($row = mysql_fetch_assoc($loggedin)) { $user_in = $row['displayname']; $user_name = $row['username']; echo " <a href='".$user_name."'>".$user_in."</a> "; } ?>that works perfect how i want it.. the thing is.. as you can see when i echo out the user thats logged in i have put a space to seperate each logged in user but i dont want that i want a commer (,) after the username if there is another username after that one if you get me so say
ashwood
was online on his own.. no commer would show but if
ashwood & tim were logged in i want it to show as
ashwood, tim
if there was 3 people..
ashwood, tim, bob
if you get me? so only the commer if there is another username after that one.. like phpbb does if you go forum index then to the bottom of the page..
Thanks Ash