I want to print specific word character in specific Line (do something like a word wrap)
Suppose I have 40 Character.
My Name Is Johnty and i am eating an Nut
and my length for character is 20.
So in First Line I want to Print 20 character but if it will break the word than whole word will print in next line.
For Example , i have 20 character length in first line than don't print like this :
First Line : My Name Is Johnty an
Second Line : d i am eating an Nut
Instead, I want following output :
First Line : My Name Is Johnty
Second Line : and i am eating an
Third Line : Nut
So How to do this in Simple PHP ??
Thanks in Advance