I have a question regarding output from loops. I have tried several ways to get my output to display properly within a content island but have yet had any success. Here is my code which outputs my data. When run independently it displays properly, but I can not get it to display in a content box.
$data = mysql_query($query, $link);
while ($row = mysql_fetch_row($data))
{
echo "<h6>";
foreach ($row as $field)
{
echo "$field<br>";
}
echo "</h6>";
}
;
If I enter $field between the EOF in the content island, I only get the last field assigned. I have tried assigning the entire while statement, as well as the foreach to a variable but they both throw errors such as unexpected while or foreach. I know there has to be a way but I'm probably not seeing the trees for the forest. Any help is greatly appreciated. Thanks.