I want to cut description string "$values['description']" after 13 character and add 3 dots after.
I found a solution here:
PHP - cut a string after X characters
$string = (strlen($string) > 13) ? substr($string,0,10).'...' : $string;
But it's a little bit complicated for me to combinate it with my code:
'desc' => str_replace(array("\t","\r", "\n"), '', preg_replace('/(<.*?>)/', '', htmlspecialchars_decode($values['description'])))