Hi, Yes, it looks like it would and the code is very compact too.
Sincerely, Mike -- Mike Brandonisio * Web Hosting Tech One Illustration * Internet Marketing tel (630) 759-9283 * e-Commerce [EMAIL PROTECTED] * http://www.jikometrix.net JIKOmetrix - Reliable web hosting On Aug 4, 2006, at 11:10 AM, Phill Sparks wrote: > That sounds like a reasonable suggestion, this would probably do > just that... > > <code> > function snipword($word) > { > if (strlen($word) > 60) > return ''; > return $word; > } > trim(str_replace(' ', ' ', implode(' ', array_map(snipword, explode(' > ', $message))))); > </code> > > Phill > > On 04/08/06, Mike Brandonisio <[EMAIL PROTECTED]> wrote: >> >> Hi Bob, >> >> How do you deal with "500 or more "X"s with no spaces"? >> >> You could explode the posted message on [space] and do a strlen() on >> each position in the array? Then test for strlen() greater than 60 >> characters. If you get a hit do str_replace() on the original >> message >> with an empty string. >> >> Do you do it another way? >> >> >> Sincerely, >> Mike >> -- >> Mike Brandonisio * Web Hosting >> Tech One Illustration * Internet Marketing >> tel (630) 759-9283 * e-Commerce >> [EMAIL PROTECTED] * http://www.jikometrix.net >> >> JIKOmetrix - Reliable web hosting >> >> On Aug 4, 2006, at 9:45 AM, Bob wrote: >> >>> Another thing I've had is 500 or more "X"s with no spaces. The idea >>> is to make your page wider (if they put enough in) to spoil your >>> page layout. > > > Community email addresses: > Post message: php-list@yahoogroups.com > Subscribe: [EMAIL PROTECTED] > Unsubscribe: [EMAIL PROTECTED] > List owner: [EMAIL PROTECTED] > > Shortcut URL to this page: > http://groups.yahoo.com/group/php-list > Yahoo! Groups Links > > > > > > > > > Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/