how to shorten a string by certain number of characters?
<p>Is there a php function that can chop let's say 10 chars of the end of a string without calling strlen ? So I can avoid unnecessary repeating of variable names. </p>

<p>all I know is <code>substr($str,0,strlen($str)-10);</code></p>
