Hi evreybody,sry before i posted wrong title name,very sory for my bad english

I have a users table which I want to display 5 records then take a new row, display 5 records, take a new row...

plz anybody help me.

this is the mysql query

$planbook_obj= Doctrine_Query::create()->select('p.personal_id,p.photo,p.title_name,p.zone_id,p.place,p.occasion,p.itinerary,p.description,p.date')->from('planbook p');
    $result = $planbook_obj->fetchArray();
    // var_dump($result);
    $this->planbooks = $result;
    <div id="planbook" class=
    "planbook-item">
    <ul class="planbook-list" >
    <?php foreach ($planbooks as $planbook): ?>
    <div id="planbook-item"" class="float-left" style="width:400px;height:200px;">
    <div class="float-left">
    <table style="border: medium double red;
    border-collapse: separate; border-spacing: 10pt 5pt">
    <tr> <td><img src="/uploads/planbooks/<?php echo $planbook['photo'] ?>" alt="" /><td></tr>
    <tr>
    <td>
    Title: <?php echo $planbook['title_name'] ?></td></tr>
    <tr><td>
    Country: <?php echo $planbook['country_id'] ?><br></td></tr>
    <tr><td>
    <span class="filed-label">Area: <?php echo $planbook['zone_id'] ?><br></td></tr>
    <tr><td>
    <span class="filed-label">Place: <?php echo $planbook['place'] ?><br></td></tr>
    <tr><td><span class="filed-label">Occasion: <?php echo $planbook['occasion'] ?><br></td></tr>
    <tr><td> <span class="filed-label">Itinerary: <?php echo $planbook['itinerary'] ?><br></td></tr>
    <tr><td><span class="filed-label">Date: <?php echo $planbook['date'] ?><br></td></tr>
    <tr><td><span class="filed-label">Description: <?php echo $planbook['description'] ?><br></td></tr>
    </table>
    <div class="clear-both"></div>

please use for each loop in this case. Thanks

plz explain details.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.