使用PHP的新函数:string wordwrap (string str [, int width [, string break [, int cut]]])
Example 1. wordwrap() example$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );echo "$newtext\n";
This example would display: The quick brown fox
jumped over the lazy dog.
自己试试吧。
Example 1. wordwrap() example$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );echo "$newtext\n";
This example would display: The quick brown fox
jumped over the lazy dog.
自己试试吧。
<tr><td style="word-break:break-all">
dfdfdfdsfdsf.
//你要显示的东西
</td></tr>
</table>看看