Is there a way to trim a text string in PHP so it has a certain number of characters? For instance, if I had the string:
$string = \"this is a string\";
substr let's you take a portion of string consisting of exactly as much characters as you need.