useronline script help
Posted: Sun Nov 24, 2002 3:10 pm
Hello,
I have created the a script to view the usernames of people currently on my site. I want the names separated by a comma except the last one. The code below is what im using to display names, it displays names ok but I'm not sure how to get it to put a full stop after last name.
I have created the a script to view the usernames of people currently on my site. I want the names separated by a comma except the last one. The code below is what im using to display names, it displays names ok but I'm not sure how to get it to put a full stop after last name.
Code: Select all
<?
//snip
if (mysql_num_rows($result)==1) {
while ($row = mysql_fetch_assoc($result)) {
echo "User Online: <b>".$rowї'username'];
}
} else {
echo "Users Online<b> ";
while ($row = mysql_fetch_assoc($result)) {
echo "<b>".$rowї'username'].", </b>";
}
}
}
<?php