Good morning, colleagues.
I have a problem, the client wants to assign the default column width, with values that already come by default in the database. I am already obtaining the data of the values of the titles. And I already have the table printed with php and bootstrap 4.
In this image are the values that each column width will receive (these values may change depending on the values that are stored in the database).
And this is the table where the column widths will be applied.
And this is my code of how I'm printing the boards with bootstrap
<h5><strong>CARACTERÍSTICAS TÉCNICAS</strong></h5>
<div class="row">
<div class="col-md-12 table-responsive">
<table class="table table-format table-hover">
<thead>
<tr>
<!-- en esta parte se imprimen los titulos -->
<?php foreach ($arrayContenido2[1] as $contenido): ?>
<th><?php echo $contenido ?></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<tr>
<?php
$count = count($arrayContenido2);
//En esta parte se imprime el contenido de las tablas
for ($i=2; $i <$count ; $i++) {
foreach ($arrayContenido2[$i] as $key => $value) {
//si es el primer titulo lo ponga en negrita
if ($key == 'A') {
echo "<th scope='row'>".$value."</th>";
}else{
echo "<td>".$value."</td>";
}
}
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>