Quick and dirty here, if you guys have a better way of doing this, please post because it's a very usefull functionb to have.
Is it a text that you want to print in a column of max 75 chars wide?
In that case, if the string is not too big,
use explode() to chop the string up into words.
Get the length of the first word.
Add it's length to a counter.
Print the word.
start loop:
Get the length of the second word.
Add it's length to the total.
Is the total over 75 chars?
{
print a linebreak.
reset total to zero.
}
print the word.
loop.