|
 |
|
อยากได้ code ตัดคำ ครับ ตอนนี้ใช้ substr(); แต่ว่ามันตัดคำไปดื้อๆ เลยอ่าคับ |
|
 |
|
|
 |
 |
|
Code (PHP)
iconv_substr($text, 0,100, "UTF-8");
|
 |
 |
 |
 |
Date :
2009-11-10 12:22:37 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
thank you
|
 |
 |
 |
 |
Date :
2009-11-10 13:30:45 |
By :
apicha31 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
$xxxx = "แต่ว่ามันตัดคำไปดื้อๆ เลยอ่าคับ
อีกอย่างตัดไม่เท่าไร่คับ คำไหนที่โดนัตัด บางครั้งเป็นภาษาต่างดาวด้วย(ส่วนที่โดนตัดน่ะคับ)";
$xxxx=htmlspecialchars($xxxx,ENT_QUOTES);
$xxxx=iconv('TIS-620','UTF-8',wordwrap(nl2br(iconv('UTF-8','TIS-620',$xxxx)),30,"\n",true));
echo '<pre>';
echo $xxxx;
echo '</pre>';
อีกทางเลือกหนึ่งครับ
|
 |
 |
 |
 |
Date :
2009-11-10 14:05:18 |
By :
ไวยวิทย์ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ว่าแต่อยากให้มันตัดแล้วหายไปเลยอ่ะคับ ข้างหลังไม่ต้องมาขึ้นบรรทัดใหม่
อ่าคับอยากได้อย่างนั้นอ่าคับ เพราะพื้นที่แสดงมันน้อยคับ
|
 |
 |
 |
 |
Date :
2009-11-10 16:40:34 |
By :
apicha31 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|