How about some simple word detection attempts like:
$words = explode (' ',$input); //create array
$new_words = ''; //empty
foreach ($words as $word)
{
if (strlen ($word) <= 40)) { $word = wordwrap ($word,40,"\n",1); }
$new_words .= ' '.$word; //add word(s) to string
}
$new_words = trim ($new_words); //kill excess spacesSo the idea here is to check each supposed word for it's length, if its a long word, longer than 40 characters, break it up. This should leave the smaller and hopefully real words away from the wordwrap-ing.
note that this is completely untested, I just wrote it here in email.
Hope that helps.
-- Jason k Larson
fongming wrote:
Hi, Sir:
There may be someone leave a message like following:
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
and it expand the width of the table on my web page and make pages ugly....
I used wordwrap($word,40,"\n",1) to prevent it, but my system is BIG5 ,two bytes, Sometimes this method would destroy the structure of the two-bytes word.
Any one has good ideas and could help me with that ? Thanks........
----------------------------------- Fongming from Taiwan.
------------------------------------------ ��From: ���H�O�Ѯ�p�q�l�l��1.5���ҵo�X... http://fonn.fongming.idv.tw [EMAIL PROTECTED]
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

