when i used substr function for limited text but i have some problem. At the end of the paragraph show ? mark sign .
$article_desc = substr($row_posts['article_desc'],0,500);
I've tried it with
$article_desc = mb_substr($text,0,502);
and it gives
चैम्पियंस ट्रॉफी के अपने पहले मैच में भारत ने पाकिस्तान को 124 रन से हरा दिया। बारिश से प्रभावित मैच में टॉस हारकर पहले बैटिंग करने उतरी टीम इंडिया ने 48 ओवर्स में 3 विकेट के नुकसान पर 319 रन बनाए। डकवर्थ लुईस मैथड
I think the issue is that substr doesn't work well with certain character sets, mb_ is the multi_byte safe version of substr.