phpmady Posted January 3, 2011 Share Posted January 3, 2011 Hi, When i am getting the part of the text using the function substr, am getting this kind of problem , (text in the end not printing properly) how to solve this. تسر مؤسسة مهارات التقنية ومؤسسة اشبكة الثنائية ان تطلع جميع عملاءها بإصدار نظام تاتش لإدارة الموقع الالكترونية من يوم السبت ا� This is the code am using $sub_string_content = substr($temp['News_Content'],0,300); Thanks, Quote Link to comment Share on other sites More sharing options...
Kieran Menor Posted January 3, 2011 Share Posted January 3, 2011 The issue arises because you have a string with multibyte characters. The normal substr() assumes that one byte equals one character. Instead, try using mb_substr(), which is the multibyte equivalent. Make sure to specify the correct encoding. Also, it requires the mbstring extension to be loaded. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.