Hi. Ich habe ein Problem mit foreach. Das Problem ist: Alles wird doppelt angezeigt. In der Datenbank ist aber nur 1 Zeile. Ich poste wie immer den Quelltext. 
Das Bild vom Fehler

PHP-Code:
<?php
include("mysql_connect.php");
$query2 = mysql_query("SELECT cid FROM pf_forum");
while ($row = mysql_fetch_array($query2))
foreach($row as $out);
$query1 = mysql_query("SELECT name FROM pf_forum");
while ($row1 = mysql_fetch_array($query1))
foreach($row1 as $out1)
{
echo "<div align=\"center\">
<table border=\"0\" width=\"80%\" style=\"border-collapse: collapse\" height=\"50\">
<tr>
<td style=\"background-image: url('images/norm-ordner.png'); background-repeat: no-repeat; background-attachment: scroll; background-position: center\" width=\"39\"><a href=\"index.php?forum=$out\"><img border=\"0px\" src=\"images/null.png\" height=\"50px\" width=\"100%\"></a></td>
<td>";
echo "<a href=\"index.php?forum=$out\">$out1</a>";
echo "</td>
</tr>
</table>
</div><br>";
};
?>

Kommentar