Marquez Design wrote:
I am trying to display information in an html table from a MySQL data base.
I can do this rather easily, however, I am trying to multiply that table
with as many entries there are in the database.
Can someone point me in the right direction or give me an example of how I
can accomplish this?
I can multiply rows and columns from the db, but can not multiply the table.
example:
<table>
<tr>
<td> $entry </td>
</tr>
<tr>
<td> $entry2 </td>
</tr>
</table>
I would like to multiply this as many times as there is entries in the
database for entry and entry2.
Thank you,
Steve Marqurez
smarquez@xxxxxxxxxxxxxxxxxx
Maybe you can do something with this.
while($row = mysql_fetch_array($rs, MYSQL_NUM))
{
if ($i % 2 == 0) $bg="#d2e1ff";
if ($i % 2 == 1) $bg="#F7F7F7";
$datum = $row[1];
echo "<tr bgcolor=$bg>";
echo "<td> $row[0] </td>";
echo "<td><b>$row[3]</b> $datum</td>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=$bg> </td>";
$text = str_replace("###","<br>",$row[2]);
$text = str_replace("<br>\n<br>\n<br>\n<br>","<br>\n<br>",$text);
$text = str_replace("<br>\n<br>\n<br>","<br>\n<br>",$text);
echo "<td bgcolor=$bg>" . $text . "</td>";
echo "</td>";
echo "</tr>";
$i+=1;
}
--
E-mail: luc@xxxxxxxxxxxxxxxxx
Internet: http://www.websitemeester.nl
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php