Heres what my block of PHP code looks like (Its set up in a function that takes in the # of times ($ShowNum) it should run thru the code)
<?
$queryShowNews = "SELECT * FROM News ORDER BY ID Desc";
$result = mysql_query($queryShowNews) or die("Query failed");
while(($line = mysql_fetch_array($result, MYSQL_ASSOC)) && ($Counter < $ShowNum))
{
?>
<tr>
<td Width="100%">
<?print $result["Date"]?>
<br>
<?print $result["NewsItem"]?>
</td>
</tr>
<tr>
<td align="right">
<a href="mailto:<?print $result["UserEMail"]?>"><?print $result["User"]?></a>
</td>
</tr>
<?
$Counter = $Counter + 1;
}
?>
but in the source of the page each entry reads:
<tr>
<td Width="100%">
<br>
</td>
</tr>
<tr>
<td align="right">
<a href="mailto:"></a>
</td>
</tr>
it does that the right # of times.
I've tried replacing the print commands with echo, but the output is still the same... Any ideas?
(Sorry the indentation is so bad... I tried 2 spaces but they dont stick)