I am using the code below to gather and show the data stored in a database. Everything is workig fine but I am not able to show it with bootstrap css. If I copy an exemple of a table (code 2 below) in boostrap it does work (which means I did included all the files for bootstrap correctly). Is there something i am missing? WHy the table I retrieve show up as a plain table and not with bootstrap css that looks nicer?
-------code 1------------
$query = "SELECT * FROM ...";
$result = mysql_query($query);
echo "<table>";
while($row = mysql_fetch_array($result)){
echo "<tr><td>" . $row['name'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
</tr>";
}echo "</table>";
mysql_close(); //Make sure to close out the database connection
?>
-----------code 2-----------
<div class="bs-example">
<table class="table">
<thead>
<tr>
<th>Row</th>
<th>Bill</th>
<th>Payment Date</th>
<th>Payment Status</th>
</tr>
</thead>
<tbody>
<tr class="active">
<td>1</td>
<td>Credit Card</td>
<td>04/07/2014</td>
<td>Call in to confirm</td>
</tr>
<tr class="danger">
<td>5</td>
<td>Telephone</td>
<td>06/07/2014</td>
<td>Due</td>
</tr>
</tbody>
</table>
-----------exemple solution updated--------
echo "<table class='table'>";
while($row = mysql_fetch_array($result)){
echo "<tr class='info'><td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
<td>" . $row['...'] . "</td>
</tr>";
}
echo "</table>";
mysql_close();
?>