Jump to content
Sign in to follow this  

How to pagination

Recommended Posts

hello, im use this module, but between to 50 files i want pagination....

<div class="table-responsive">
            <table class="table table-hover">
            <thead >
                <tr align="center">
                    <th>Tipo de Aeronave</th>
                    <th>Carga Maxima</th>
                <?php if($aircrafts != null){ 
                    foreach($aircrafts as $aircrafts){?>
                    <tr align="center">
                        <td><?php print $aircrafts->fullname;?></td>
                        <td><?php print $aircrafts->registration;?></td>
                        <td><?php print $aircrafts->range;?> <b>Nm </b></td>
                        <td><?php print $aircrafts->airline;?> </td>
                        <td><?php print $aircrafts->maxpax;?> </td>
                        <td><?php print $aircrafts->maxcargo;?> <b>lbs</b></td>
                        <td><a href="<?php echo url('fleet/view/'.$aircrafts->id); ?>"><button class="btn btn-success">Ver</button></a></td>
                <?php }}?>
        <div class="pagination">
            <?php $query = "SELECT * FROM phpvms_aircrafts";
                $total_registros = $aircrafts->id;
                $total_pagina = ceil($aircraft->id/'20');

                print '<a href="https://oneworldv.com/index.php/fleet?pagina=1">'.' Primera '.'</a>';

                for($i=1; $i<=$total_paginas; $i++){
                    print '<a href="https://oneworldv.com/index.php/fleet?pagina='.$i.'">'.$i.'</a>';
                print '<a href="https://oneworldv.com/index.php/fleet?pagina=$total_paginas">'.' Ultima '.'</a>';

but i cant to run....

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...