Combinate strlen(), str_replace(), substr()
<p>I want to cut description string "$values['description']" after 13 character and add 3 dots after.</p>

<p>I found a solution here:</p>

<p><a href="http://stackoverflow.com/questions/3161816/php-cut-a-string-after-x-characters">PHP - cut a string after X characters</a></p>

<pre><code>$string = (strlen($string) &gt; 13) ? substr($string,0,10).'...' : $string;
</code></pre>

<p>But it's a little bit complicated for me to combinate it with my code:</p>

<blockquote>
  <p>'desc' => str_replace(array("\t","\r", "\n"), '',
  preg_replace('/(&lt;.*?>)/', '',
  htmlspecialchars_decode($values['description'])))</p>
</blockquote>
