php trim string if longer than
snippet in php

php trim string if longer than

user7486

substr($str,0,50);