$result = mysql_query ("SELECT id, name, link, item FROM panel_items WHERE extra = 'right'");
While (list($id, $name, $link, $item) = Mysql_fetch_row($result)){
$tp_content->set("header_right", "$name");
$tablename = "$item" . "_items";
$query_string = "SELECT header FROM $tablename";
$result_id = Mysql_Query($query_string) or die ("<b><font face=\"arial\" size=\"2\">Display_db_query : </b><i>" .Mysql_Error() . "</i></font>");
$res = "";
while ($row = mysql_fetch_row($result_id))
$res .= join("<br>", $row);
$tp_content->set("content_right", $res);
$tp_content->parse("table-right");
$num++;
$res = "";
}
$tp_content->parse();
$tp_content->spit();
The result of this piece of code is :
test item 1test item 2test item 3
But thats wrong...it has to have breakz like :
test item 1
test item 2
test item 3
I tried to put it all in an array and store it like :
$array[1] = test item 1
$array[2] = test item 2
$array[3] = test item 3
Anyone know how i can do this ?
-Galo