Hi!
do not use "substr" in PHP. otherwise, the Russian language can cut incorrectly and in the end gets a "question mark", like this:
в режиме онла�...
this: �����
Hi!
do not use "substr" in PHP. otherwise, the Russian language can cut incorrectly and in the end gets a "question mark", like this:
в режиме онла�...
this: �����
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.]
This topic has been closed to new replies.