<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-block">
                <h2 class="card-title">Listagem de Veículos</h2>
                <div align="right">
                </div>
                <div class="table-responsive m-t-40">
                    <table id="example23" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0" width="100%">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>Prefixo</th>
                            <th>Placa</th>
                            <th>Ano de Fabricação</th>
                            <th>Garagem</th>
                            <th>Tipo</th>
                            <th width="30">Carroceria</th>
                        </tr>
                        </thead>
                        <tfoot>
                        <tr>
                            <th>#</th>
                            <th>Prefixo</th>
                            <th>Placa</th>
                            <th>Ano de Fabricação</th>
                            <th>Garagem</th>
                            <th>Tipo</th>
                            <th width="30">Carroceria</th>
                        </tr>
                        </tfoot>
                        <tbody>
                        <?php foreach ($veiculos as $r) {?>
                        <tr>
                            <td><?php echo $r->ID_VEICULOS ?></td>
                            <td><?php echo $r->PREFIXO ?></td>
                            <td><?php echo $r->PLACA ?></td>
                            <td><?php echo $r->ANO_FABRICACAO ?></td>
                            <td><?php echo $r->GARAGEM ?></td>
                            <td><?php echo $r->TIPO == "P"?"PADRON":"ARTICULADO/BRT" ?></td>
                            <td><?php echo $r->CARROCERIA ?></td>
                        </tr>
                        <?php } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $('#example23').DataTable({
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    });
</script>