Hướng dẫn dùng text wrapper trong PHP
Hàm Show Bài viết này được đăng tại freetuts.net, không được copy dưới mọi hình thức. Cú phápCú pháp: Trong đó:
Cách sử dụng hàm wordwrap: Bài viết này được đăng tại [free tuts .net] Code $text = "this is a test stringgggggggggggggggggggggggg"; echo $newtext = wordwrap($text, 20, "-")." Kết quả this is a test-stringgggggggggggggggggggggggg this is-a test-stringgg-gggggggg-gggggggg-gggggg this is-a test-stringgggggggggggggggggggggggg Tham khảo: php.net (PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8) wordwrap — 打断字符串为指定数量的字串 wordwrap( 输入字符串。 列宽度。 使用可选的 如果 示例 #1 wordwrap() 范例 以上例程会输出: 示例 #2 wordwrap() 范例 以上例程会输出: 示例 #3 wordwrap() 例子 以上例程会输出: Alhadis ¶ 7 years ago if( return };?> ju1ius ¶ 10 years ago
Dave Lozier - dave at fusionbb.com ¶ 16 years ago
frans-jan at van-steenbeek dot R-E-M-O-V-E dot net ¶ 16 years ago
michdingpayc ¶ 2 months ago
altin_bardhi at yahoo dot co dot uk ¶ 11 years ago
strlen($value) >= $chunk_length){//Split the chunks/words which are longer than $chunk_length Peter ¶ 15 years ago
answers at clearcrescendo.com ¶ 3 years ago
$del=' at '; 'sanneschaap' dot $del dot 'gmail dot com' ¶ 14 years ago
php at maranelda dot org ¶ 13 years ago
= "some text that must wrap nice";$a = wordwrap($a, 9); info at hsdn dot org ¶ 11 years ago
mb_substr($string, $i, 1, 'UTF-8') == ' ') Marcin Dobruk [zuku3000 at yahoo dot co dot uk] ¶ 13 years ago
ojs-hp at web dot de ¶ 12 years ago
$newText[] = $word; //add word to array maikuolan at gmail dot com ¶ 9 years ago
kozimbek at mail dot ru ¶ 7 years ago
phil_marmotte at yahoo dot fr ¶ 8 years ago
joachim ¶ 14 years ago
tuxedobob ¶ 5 years ago
zac dot hester at gmail dot com ¶ 7 years ago
bruceboughton @ google mail ¶ 17 years ago
nbenitezl[arroba]gmail[dot]com ¶ 11 years ago
$newStr; Matt at newbiewebdevelopment dot idk ¶ 13 years ago
simbiat at bk dot ru ¶ 5 years ago
|