Why is my text not displayed properly when I use "substr"?
function limitstring($input,$number) {
if (strlen($input) > $number){
$input = substr($input, 0, $number) . '...';
}
return $input;
}
Input:
echo $row['text'];
Output: Käse
Input:
limitstring($row['text'],60);
Output: K�se...