Menu
I have a string with 10 words in it. I want to make a newline every 5th word. I have tried with
[code]$string = “Test1 Test2 Test3 Test4 Test5 Test6 Test7 Test8 Test9 Test10″;
while(count(explode(” “,$string, 5)) == 5)
{
echo “$string<br />”;
$string = strtok(” n”);
}
But it just prints out the ten words in a line.
Pls help!