Wizzart - Recent Comments
too small support UTF-8 and cyrilic (2 posts)

  1. Den999
    Posted 5 years ago #

    do not use "substr" in PHP. otherwise, the Russian language can cut incorrectly and in the end gets a "question mark", like this:

    в режиме онла�...

    this: �����

  2. Den999
    Posted 5 years ago #

    may be this exampes can help you to understand:

    function maxsite_str_word($text, $counttext = 10, $sep = ' ') {
    	$words = split($sep, $text);
    	if ( count($words) > $counttext )
    		$text = join($sep, array_slice($words, 0, $counttext));
    	return $text;

    [Please post code snippets between backticks or use the code button.]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Wizzart - Recent Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic