<table border=1>
<tr>
<?php
$stream[1] = "one";
$stream[2] = "two";
$stream[3] = "three";
$stream[4] = "four";
$stream[5] = "five";
$stream[6] = "six";
$allstream = array($stream[1], $stream[2], $stream[3], $stream[4], $stream[5], $stream[6]);
$i=0;
while ($allstream[$i]){
echo "<td>".$allstream[$i]."</td>";
$i++;
}
?>
</tr>
<tr>
<?php
$i=3;
while ($allstream[$i]){
echo "<td>".$allstream[$i]."</td>";
$i++;
}
?>
</tr>
</table>
I put together above script. and its working... but not entirely the way i want it... As you can see the 1st line in the table also show the cells four five and six which obviously must not be shown since they are on line 2 of the table... how do i solve that?
Also if you look at my code... you see 2 rows, but i think there must be a way of avoiding this? by just having one row and apply the while somehow it dynamically generates a new row when it has 3 cells in one row...
I cant really think of a way doing this ⭕o:o
Thanks in advance ! 🙂