On Wednesday 17 November 2004 23:15, Merlin wrote: > actually that is not as easy as it looks. Nowhere in your original post did you specify what exactly it is you wanted. > Lets say we want to ad a \n after each 80 characters. There is always the > problem what happens if the line has already a \n inside. > > E.g: > This is a sample text. This is a sample text. > This is a sample text > > Should result in: > > This is a sample text. This is a > > sample text. > > This is a sample text > > That looks very complicated to me. Can anybody point me into the right > direction? Thanx for any help, If it's only one level of '>' that you need to add then it's pretty easy using the wordwrap() function. If you need to handle multiple levels then it will get very complicated, and you should probably google for some algorithms. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Isn't it strange that the same people that laugh at gypsy fortune tellers take economists seriously? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php