for ($q = 1 ; $q < 7 ; $q++ )
{
echo $q ; echo $row;
}
now this code works fine but i want to echo 2 rows like in the image below:
I don't want use other for loop,
Can i do it with table html tags ?
You can achieve this using variables that you will echo later just like this:
$tableHeader = "";
$tableRow = "";
for ($q = 1 ; $q < 7 ; $q++ )
{
$tableHeader .= "<th>" . $q . "</th>";
$tableRow .= "<td>". $row ."</td>";
}
echo "<table> <tr>$tableHeader</tr> <tr>$tableRow</tr> </table>";
upvote it if it was helpfull :)