Reputation: 21
Thanks in advance
i have the Tamil Content retrieved from MYSQL DB in one variable i need to limit that content
from mysql Its some junk word how can i limit exactly
ex:
$my_Content = "சென்னை: படிக்க வாய்ப்பில்லாத சிறுமிகளை கண்டறிந்து, பள்ளியில் சேர்த்த சாதனை மாணவியால், அப்பகுதியில் பல குழந்தைகள் படித்து வருகின்றனர். சென்னை புளியந்தோப்பு, சாஸ்திரி நகரில், மாநகராட்சி நடுநிலைப் பள்ளியில், இடைக்கால பள்ளி செயல்பட்டு வருகிறது. இதன் நோக்கம் படிக்க வாய்ப்பில்லாத, 14 வயதுக்குட்பட்ட குழந்தைகளை கண்டறிந்து, ஓர் ஆண்டு அடிப்படைக் கல்வியை கற்று தர வேண்டும். பின் மாணவர்களின் வயதுக்கேற்ப, உரிய வகுப்பில், படிப்பை தொடர செய்ய வேண்டும். இடைக்கால பள்ளியில், இந்த ஆண்டு 20 பேர் சேர்ந்துள்ளனர். அதில் லட்சுமி என்ற மாணவி பெற்றோர் அனுமதியின்றி, பள்ளியில் சேர்ந்துள்ளார். அத்துடன் ஏழு மாணவர்களை இடைக்கால பள்ளியிலும், இரண்டு மாணவர்களை சத்துணவு மையத்திலும் சேர்த்துள்ளார்."
so i need to save this to mysql DB Using php i can save and retrieve and see browser proper as normal utf format.
My question is : if i use normal the DB have some junk value how can limt from that
i need to get the output as
சென்னை: படிக்க வாய்ப்பில்லாத சிறுமிகளை கண்டறிந்து, பள்ளியில் சேர்த்த சாதனை மாணவியால், அப்பகுதியில் பல குழந்தைகள் படித்து ... Read more
how can i do please any one help me to solve
Upvotes: 2
Views: 73
Reputation: 3379
You can use mb_substr
to limit the chars of an utf8 encoded string.
See also http://php.net/manual/en/function.mb-substr.php
Upvotes: 1