Have an account? Sign in
Login  Register  Facebook
Create Awesome PHP/MYSQL Pagination
Hey, You have great site, thanx for all.

I have problem with Create Awesome PHP/MYSQL Pagination.
I have site where I have 3 collumns ( in css), I want to add 3 records for each.
Is it possible??
I can't english co I add picture if You don't understand sth.



Regards.
Started: October 2, 2011 Latest Activity: October 8, 2011 pagination

Give me the codes you already achieved to determine which method we will use (css float or just tables and break)
October 3, 2011

2 Answers
Thanx.I know now how to edit it.

Posted: dennykr
In: October 8, 2011

if you want to use one table and start new line after 3 values use:
<table width="100%">
    <tr>
    <?php $i = 0;?>
    <?php
    	foreach (range(1,9) as $value){
    ?>
        <?php $i++;?> 
                <td>
                    <?php echo $value;?>
                </td>
    <?php
    	if (($i % 3) == 0){
            echo '</tr><tr>';
        }
    ?>              
    <?php
    	}
    ?>
    </tr>
</table>

Posted: Dina
In: October 2, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer