This is so specific I couldn't even search for an answer.
I've tried other methods but this is the only one that come close.
I need to list the Alts of a Roster and have it into a single string.
This code is almost what I need, as it will echo a list.
$rostersql=" SELECT name
FROM roster_members
WHERE LOWER(officer_note)='ALT-" . strtolower($name) . "'";
$result2=mysql_query($rostersql);
if (mysql_numrows($result2) > 0)
{
while($row = mysql_fetch_array( $result2 )) {
// Print out the contents of each row
echo $row['name'];
echo "<BR>";
}
}else{
echo "No Alts";
}
But I need to get the output to be "$alt = name1 name2 name3" and so on so it can be called again later to be put into a table.
Basically the whole list together with a space between each name.