Answers for "php truncate a string"

PHP
1

php truncate string

$string = (strlen($string) > 13) ? substr($string,0,10).'...' : $string;
Posted by: Guest on July-02-2021

Browse Popular Code Answers by Language