Re: [PHP] counting max word length fails on line brake

2002-05-15 Thread 1LT John W. Holmes
You might want to look into wordwrap(), too www.php.net/wordwrap ---John Holmes... - Original Message - From: "Analysis & Solutions" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 10:42 AM Subject: Re: [PHP] co

Re: [PHP] counting max word length fails on line brake

2002-05-15 Thread Analysis & Solutions
On Wed, May 15, 2002 at 12:49:30PM +0200, andy wrote: > > test > ölakjdfölakjdöfkjaödlfkjöaksdjföl > > it asumes thtat the word is: test ölakjdfölakjdöfkjaödlfkjöaksdjföl > > $word = explode(" ",$string); Because you're splitting on spaces only. If you want to split on more than just spaces

[PHP] counting max word length fails on line brake

2002-05-15 Thread andy
Hi there, I would like to check user input for to long words. Therefore I did code a function returning a string seperated by dash if it is more than $maxlength. If it is 2 times maxlength it returns false. Works good execept on line brakes. So if the input is: test ölakjdfölakjdöfkjaödlfkjöaks