I loop through a multidimensional array to echo the first five values of every "row" as a table. As far as that, it works perfectly:
"<table>";
for ($row = 0; $row < $index_number; $row++) {
echo "<tr>";
for ($col = 0; $col < 5; $col++) {
echo "<td>".$tablevalue[$row][$col]."</td>";
}
echo "</tr>";
}
echo"</table>";
Now I want to display numbers 1 to 3 and then 8 and 9 again. Neither one for loop inside another nor two seperate loops work the way I want them to.
Thats what I tried so far:
echo "<table>";
for ($row = 0; $row < $index_number; $row++) {
echo "<tr>";
for ($col = 0; $col < 3; $col++ && $col2 = 8; $col2 < 10; $col2++) {
echo "<td>".$tablevalue[$row][$col]."</td>";
}
echo "</tr>";
}
echo"</table>";
Any ideas on how to make it work?