A few days ago i posted a question how i could divide a
query's result over 2 collumns.
I got the following code thanks to Pedro:
echo '<table class="search_result" summary="search result">';
$column = 0;
while ($row = mysql_fetch_array($result)) {
if (!$column) echo '<tr>';
echo '<td>', $row['whatever'], '</td>';
if ($column) echo '</tr>';
$column = !$column;
if ($column) echo '<td>(empty cell)</td></tr>';
echo '</table>';
It works great except for one thing:
When the result is for example 5 items,
The table looks like: Instead of:
_____ _____ _____ _____
|__x__|__x__| |__x__|__x__|
|__x__|__x__| |__x__|__x__|
|__x__| |__x__|_____|
"x" indicates an item.
Anyway, can someone please help me to get the table
structure correct? Any help would be great.
Greetings knoak