When I use substr()
I get a strange character at the end
$articleText = substr($articleText,0,500);
I have an output of 500 c
You are trying to cut unicode character.So i preferred instead of substr()
try mb_substr()
in php.
substr()
substr ( string $string , int $start [, int $length ] )
mb_substr()
mb_substr ( string $str , int $start [, int $length [, string $encoding ]] )
For more information for substr() - Credits => Check Here