I have a slight display problem in my project.
The thing is, I want to display some information ( SHOW Columnsbtw sql query column types ) in a table, but it does not display properly.
The code:
try
{
echo '<table class="table table-bordered table-striped mb30 mt30">';
echo'<thead>
<th class="text-center">Name of column</th>
<th class="text-center">Type</th>
<th class="text-center">Update</th>
<th class="text-center">Delete</th>
</thead>';
echo'<tbody>';
$sql = $bdd->query("SHOW COLUMNS FROM ".$table);
$column_name = $bdd->query('select column_name from information_schema.columns where table_name = "'.$table.'" and table_schema = "'.$db_name.'" ');
$i = 0;
while($donnees = $column_name->fetch())
{
$column = $donnees[$i];
echo '<tr><td class="col-db text-center">'.$donnees[$i].'</td>';
while ($row = $sql->fetch())
{
echo '<td class="col-db text-center">'.$row["Type"].'</td>';
}
?>
<td><p class="text-center"><a href="form_update_table.php?database=<?php echo $db_name;?>&table=<?php echo $table;?>&column=<?php echo $column;?>" class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-pencil"></span></a></p></td>
<td><p class="text-center"><a href="drop_column.php?database=<?php echo $db_name;?>&table=<?php echo $table;?>&column=<?php echo $column;?>" onclick="return confirm_delete()" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash"></span></a></p></td></tr>
<?php
}
$i = $i + 1;
}
and the result:

Sorry, no in Line breakbetween "Types" ><, how can I fix this?
I already tried a <br/>, it hasn’t changed anything.
source
share