Answers for "php truncate string by words"

PHP
1

php truncate string

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

php truncate string

echo substr('hello world', 0, 5); //hello
Posted by: Guest on September-12-2021

Browse Popular Code Answers by Language