มีนมีปัญหาเกี่ยวกับการแบบคำภาษาไทยคับ เพราะมันแบบเป็นภาษาอะไรก็ไม่รู้ เหมือนกับว่ามันไม่มสามารถทำงานกับภาษาไทยได้
เช่น $text=substr("ฟหกด",0,2); มันจะต้องแบ่งได้ ฟห แต่พอเอาไปเขียนเกี่ยวกัยการแบ่งไทยดันแบ่งไม่ได้
$text=substr("good",0,2); แต่ถ้าเป็น ภาษาอักฤษจะไม่มีปัญหาเลย...แบ่งคำได้เป็นปรกติ
ไม่มทราบว่ากรณีนี้มันเป็นที่อะไรคับ...แล้วจะแก้ไขอย่างไร.....ขอบคุณนะคับ
ปัญหาเรื่อง function substr(); ........!
Moderators: mindphp, ผู้ดูแลกระดาน
- may_sci
- PHP Jr. Member
- Posts: 10
- Joined: 01/01/1970 7:00 am
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 26646
- Joined: 22/09/2008 6:18 pm
- Contact:
ลอง ใช้ เป็น $text=substr('ฟหกด',0,2);
ดูครับ
ดูครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- Replies
- Views
- Last post
-
-
JavaScript : เรียกใช้ function ที่1 แล้วให้ function ที่ 1 เรียก function ที่ 2
by cannoi » 09/08/2011 7:50 pm » in JavaScript & Jquery Ajax - 9 Replies
- 14444 Views
-
Last post by cannoi
11/08/2011 8:34 am
-
-
-
Built-in functions (3) ฟังชัน Substr และ ฟังก์ชั่น Strlen
by จันนุสรณ์ ดีแก่ » 20/11/2018 2:09 pm » in PHP Knowledge - 1 Replies
- 529 Views
-
Last post by makup
09/10/2020 11:42 am
-
-
-
phpBB 3.1.4 ออกแล้ว fix ปัญหาเรื่อง Security
by mindphp » 05/05/2015 3:50 am » in MindPHP News & Feedback - 0 Replies
- 657 Views
-
Last post by mindphp
05/05/2015 3:50 am
-
-
- 1 Replies
- 2908 Views
-
Last post by mindphp
03/10/2017 4:36 pm
-
- 0 Replies
- 1904 Views
-
Last post by ธวัชชัย แสนหาญ
04/01/2019 10:15 am
-
-
Call to undefined function เรียก function ไฟล์อื่นเข้ามาใช้งาน phpbb3.1
by thatsawan » 28/09/2014 9:56 pm » in Programming - PHP - 0 Replies
- 750 Views
-
Last post by thatsawan
28/09/2014 9:56 pm
-
-
-
ใช้ function getdate Strict Standards: getdate() [function.getdate]:
by nat9999 » 02/01/2012 10:58 pm » in Programming - PHP - 3 Replies
- 1924 Views
-
Last post by mindphp
18/12/2019 12:42 pm
-
Who is online
Users browsing this forum: No registered users and 16 guests