I have the following code:
Code: Select all
echo "<table border=\"1\">";
foreach($html->find('td[class=statBox]') as $stats){
//PUT in the delimeter
$add_delimeter = $stats->plaintext . "|";
$token = strtok($add_delimeter, '|');
echo "<td>" . $token . "</td>";
}
echo "</table>";DATA | DATA | DATA | DATA | DATA | etc....
Of course it outputs this way, because this is what the above code is telling it to do, but I am having issues trying to make the data output a new table row after say every 5 tokens. So for example I want the output to look like this:
DATA | DATA | DATA | DATA |DATA
DATA | DATA | DATA | DATA |DATA
DATA | DATA | DATA | DATA |DATA
DATA | DATA | DATA | DATA |DATA
DATA | DATA | DATA | DATA |DATA
DATA | DATA | DATA | DATA |DATA
I'm stuck for how to do this. Any help would be greatly appreciated.
Thanks for your time,