Hi there,
I have the following code:
$side1 = '#EFEFEF';
$side2 = '#DDDDDD';
$sideoffset = 0;
echo "<table>";
$column = 0;
while ($myrow = mysql_fetch_arr ay($result2)) {
$TDcolor = ($sideoffset++ % 2) ? $side1 : $side2;
if (!$column) echo "<tr >";
echo "<td bgcolor=\"$TDco lor\">",$myrow["last"],"</td>";
if ($column) echo "</tr>";
$column = !$column;
}
if ($column) echo "<td></td></tr>";
echo "</table>";
This really works great, but my next problem is that collumns on
the left side, need another <td>$var</td> on their left, and
the ones on the right need it on the right, so the output would
look like:
_ _____ _____ _
|_|__x__|__x__| _|
|_|__x__|__x__| _|
|_|__x__|__x__| _|
I hope this is clear enough, and that anyone can help me...
Greetings knoakske
I have the following code:
$side1 = '#EFEFEF';
$side2 = '#DDDDDD';
$sideoffset = 0;
echo "<table>";
$column = 0;
while ($myrow = mysql_fetch_arr ay($result2)) {
$TDcolor = ($sideoffset++ % 2) ? $side1 : $side2;
if (!$column) echo "<tr >";
echo "<td bgcolor=\"$TDco lor\">",$myrow["last"],"</td>";
if ($column) echo "</tr>";
$column = !$column;
}
if ($column) echo "<td></td></tr>";
echo "</table>";
This really works great, but my next problem is that collumns on
the left side, need another <td>$var</td> on their left, and
the ones on the right need it on the right, so the output would
look like:
_ _____ _____ _
|_|__x__|__x__| _|
|_|__x__|__x__| _|
|_|__x__|__x__| _|
I hope this is clear enough, and that anyone can help me...
Greetings knoakske
Comment