Hi, sir: I tried it but also failed.
For One Chinese Character is composed with two bytes, and between every word and word in a line, there is no space " ",(Not like english). For example: English's thank you is : Thank you very much! Chinese's thank you is : 真的多謝您了! and some word's second byte is "\" char, and it would be combine with "\n" to be "\\n", and it's structure would be destroied . Any idea ? Thanks ......... -----------------original mail-------------------- Greetings, 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 spaces So 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: 此信是由桃小電子郵件1.5版所發出... > http://fonn.fongming.idv.tw > [EMAIL PROTECTED] > ------------------------------------------ ◆From: 此信是由桃小電子郵件1.5版所發出... http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php