Reputation: 485
I am using substr() function to cut strings. It worked ok with normal string but in case of string with accent marks, it displayed funny characters just before the cut like this:
Here is the code:
$rawtitle ="Tin đăng của giangvy1011 tin của dtdd";
$title = substr($rawtitle,0,36).'...';
echo $title;
Here is the result i got for the echo:
Is there any way around this or different function to archieve this? Many thanks
Upvotes: 3
Views: 101