$query=("SELECT name FROM users WHERE menstruated = '1'");
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$online=mysql_result($result,$i);
echo " $online ";
$i++;
}
$query = ("SELECT name FROM users WHERE menstruated='1'");
$result = mysql_query($query);
$num = mysql_numrows($result);
$i = 0;
while ($i < $num) {
$online = mysql_result($result, $i);
echo $online.",";
$i++;
}