A
Anonymous
Guest
The following code places a series of strings all in one cell. I want to change it so that I use the implode command to place all of the names in the same cell separated by commas.
My new code looks like follows, but I get an error in the cell. I know I must have some syntax wrong but I have checked all over the net but cannot discover the problem.
[/code]
Code:
$result1 = mysql_query($query1);
echo "<td>";
while ($row1 = mysql_fetch_array($result1))
{
extract($row1);
echo "$Name ";
}
echo "</td></tr>";
My new code looks like follows, but I get an error in the cell. I know I must have some syntax wrong but I have checked all over the net but cannot discover the problem.
Code:
$result1 = mysql_query($query1);
echo "<td>";
echo implode(", ",$result1);
echo "</td></tr>";