21.07.2014, 22:40
hello,
How to cut a sentence without cutting word?
I wanted to take the logic of php but I do not see how to convert pawn
thanks !!
How to cut a sentence without cutting word?
I wanted to take the logic of php but I do not see how to convert pawn
Код:
$maxchar= 20; if (strlen($string) > $maxchar) $string= substr($string, 0, $maxchar) ; $space= strrpos($string, " ") ; $string= substr($string, 0, $space)."..." ; echo $string;