PHP:
1
2
3
4
5
6
7
8
9
10
| <? include("config.php"); $mc = mysql_connect($host); mysql_select_db ($db, $mc); $sql = mysql_query("SELECT * FROM forum, heads"); while ($result = mysql_fetch_object($sql)) { echo("<b>$result->headname<b> $result->headid<br>"); } mysql_close($mc); ?> |
levert dit resultaat:
code:
1
2
3
4
| <b>php schuur</b> php in je computer <b>php schuur</b> php in je harses |
nu laat hij dus eigenlijk 2 keer het kopje zien, omdat er 2 'forums' zijn, maar, wat ik wil is, dat hij 1 keer het kopje laat zien, en dan daaronder de 2 forums. BVD