Hey everyone.
I'm trying to format the results of a database (mysql) query into an html table and i can't quite seem to get it working. I'd like the data to go inmto two collums, like this:
+--------------+---------------+
| result 1 | result 2 |
| result 3 | result 4 |
| result 5 | result 6 |
+--------------+---------------+
.etc....
Here's what i've been working with. For some reason it's not working (i think it's probably infinite)
$db_result_pnt_cat = TRUE;
while(($db_result_pnt_cat = TRUE)) {
print("<tr>");
for ($i=0; ($db_result_pnt_cat = mysql_fetch_array($db_query_pnt_cat) && $i < 2); $i++) {
print("<td class = \"topic\">\n");
print("<span class = \"topic_head\">$db_result_pnt_cat[topic]<br/></span>\n");
print("<span class = \"topic_desc\">$db_result_pnt_cat[topic_desc]</span>\n");
print("</td>");
}
print("</tr>");
}
(i hope my indenting turns out on this forum)
Thanks for your help
-ben