I’m using explode() to basically take apart paragraphs into individual words. Works great. The looping through with a foreach(). Also works great. Nothing complicated here.
$title_pieces = explode(" ", $title_fixed);
foreach($title_pieces as $tpiece){
echo "<b>$tpiece<br>";
}
Unfortunately this returns just an ugly long list of words. What I’d like to do but can’t quite figure out how is to put this all in a nice table. Creating the table is no problem, the part I can’t figure out is how to get it to write more than one $tpiece per row. I’d like to have maybe 5 <td>s in each row.
So if I do:
foreach($title_pieces as $tpiece){
echo "<tr><td>$tpiece</td></tr>";
}
I’m still just left with a long list. Can someone point me in the right direction here.
Just a sample-code. Work around with the
modulo-operator.