I'm using a function to limit the amount of characters that are shown, something like this:
function blabla ($string, $maxSize) {
if (strlen($string) > $maxSize)
$string = substr($string, 0, $maxSize) . ' [...]';
return $string;
}
But it is returning some bugged characters like: "title" gets "Title", but when I do not use the function the string comes normal, with no bugged characters. how can I resolve this?
I'm using this in the header:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />