I have a project and I need to organize weekly results in a table.
<!DOCTYPE html>
<html>
<head>
<title>tabla semanal</title>
</head>
<body>
<table border="1">
<tr>
<th>EMPLEADO</th>
<th>LUNES<br>(fecha)</th>
<th>MARTES<br>(fecha)</th>
<th>MIERCOLES<br>(fecha)</th>
<th>JUEVES<br>(fecha)</th>
<th>VIERNES<br>(fecha)</th>
<th>SABADO<br>(fecha)</th>
<th>DOMINGO<br>(fecha)</th>
</tr>
<tr>
<td>JUAN</td>
<td>56</td>
<td>67</td>
<td>34</td>
<td>23</td>
<td>25</td>
<td>78</td>
<td>90</td>
</tr>
<tr>
<td>PEDRO</td>
<td>90</td>
<td>67</td>
<td>45</td>
<td>56</td>
<td>34</td>
<td>33</td>
<td>56</td>
</tr>
</table>
</body>
</html>
this is the code in php, it works for me vertically but I want to organize them:
<?php
include 'conexion.php';
$sql = mysqli_query($conect, "SELECT * FROM tabla WHERE fecha
BETWEEN CURRENT_DATE()-7 AND CURRENT_DATE() ORDER by fecha DESC");
echo '<table border="2">
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Fecha</th>
<th>i</th>
</tr>';
while ($row = mysqli_fetch_array($sql)) {
echo'<tr>
<td>'.$row ['id'].'</td>
<td>'.$row ['nombre'].'</td>
<td>'.$row ['fecha'].'</td>
<td>'.$row ['item'].'</td>
</tr>';}'
</table>';
?>
Thanks in advance.