php - strange output with bootstrap table in while loop -


i try make while loop boostrap table gives me strange output

here image enter image description here

as see after second loop output outside of selected div.

also first row of table placed right.the rest of rows shown seen in image

here code

 <?php     $x= 1;     while ( $x <= $_session['noc']){         require ('conntodb.php');         $stmt= $conn->prepare('select catname food_category st_id= :st_id , catcount= :catcount' );         $stmt->bindparam(':st_id',$_session['st_id']);         $stmt->bindparam(':catcount', $x);         $stmt->execute();         $catres= $stmt->fetchall(pdo::fetch_assoc);         foreach($catres $row) {         echo "<h3>" . $row['catname'] . "</h3>";     }     echo "<div class='table-responsive'>"     ."<table class='table table-condensed'>"     ."<thead><tr><th>Πίατο</th><th>Τιμή</th><th>Επεξεργασία</th></tr></thead>";     echo "<tbody>";  $selall1 = $conn->prepare('select food_id, fname, fprice food_1 st_id= :st_id , ftype= :ftype order food_id asc');     $selall1->bindparam(':st_id',$_session['st_id']);     $selall1->bindparam(':ftype',$x);     $selall1->execute();     $useres1 = $selall1->fetchall(pdo::fetch_assoc);     foreach($useres1 $rows) { echo "<tr><td>" . $rows['fname'] . "</td><td>" . $rows['fprice'] . "</td>   <td><a href='pledit.php?id=" . $rows['food_id'] . "'>Επεξεργασία</a></td></tr>"; echo "</tbody>" ."</table>" ."</div>"; } $x++; }  ?> 

my first thought div has not enough height after setting height in div output:

enter image description here

what missing guys?

thanks in advance

vaggelis

check html output, should quite messed up, , try put

<?php echo "</tbody></table></div>"; //outside of loop ?> 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -