Hello can anyone help me here. I have to display all the record in 2 column but the thing is the next record will be go below the first record.

Heres the scenario.

if the total # of records is 11 then

1 - 7

2 - 8

3 - 9

4 - 10

5 - 11

6 -

Thats the display i want to see.
THis is only a html table issue i think. Can anyone help me with this one... Can anyone show me the code to display that kind of result...

    very rough edited version here probably with some errors and maybe tags not all closed -
    also it will do too many nested tables but it should help

    set a counter $j
    set a stopvalue - you could define it as half your returned count - the one here is a hardcoded 6 - when it reaches that value it does '</td><td>spacer</td><td>' and then carries on

    <table>
    <tr>
    <td>
    <?php
    $j=0;
        $result = mysql_query("SELECT * FROM $revutbl_name, members WHERE $revutbl_name.mem_id=members.mem_id AND pare_id=0 ORDER BY dat desc LIMIT 12 ", $db) or $error.=(mysql_error());
    
    while ($row=mysql_fetch_array($result))
    {
    $thisrevu_id=$row["revu_id"];
    $thispare_id=$row["pare_id"];
    
    if ($j==6) echo '</td><td>&nbsp;</td><td>';
    ?>
    
    <table border='0' cellspacing='0' cellpadding='0' width='345'>
        <tr>
        <td rowspan='3' class='onav3'><img src="images/spacer.gif" height='5' width='2'></td>
            <td colspan='2' ><?php echo $row['hdng'];?></td>
            <td align='right' class="<?php echo $headcolr ;?>"><a href="<?php echo $PHP_SELF,'?pgtype=wrty&pare_id=',$thispare_id;?>" class="revu">Reply</a>&nbsp;</td>
            <td rowspan='3'><img src="images/spacer.gif" height='5' width='2'></td>
        </tr>
        <tr>
            <td ><?php echo $row['mem_username'];?></td>
            <td ><?php echo $row['date']; ?></td>
            <td><?php echo $row['rating'];?> &nbsp; &nbsp; &nbsp;</td>
        </tr>
        <tr>
            <td colspan='3' ><?php echo $row['txt']; ?></td>
        </tr>
    </table>
    
    
    <?php
    
    $j++;
    }
    ?>
    </td>
    </tr>
    </table>
    

      What you can do is read all of the results into an array, and then from there call 1, 7, 2, 8, 3, 9, 4, 10 etc.

      Yeh?

        Write a Reply...