first commit

This commit is contained in:
pakerpale
2020-06-10 06:21:34 +09:00
commit 20c9739ba9
1913 changed files with 266257 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<?php
if(!function_exists('wordlimit')) {
function wordlimit($string, $length = 40, $ellipsis = "...")
{
$string = strip_tags($string, '<div>');
$string = strip_tags($string, '<p>');
$words = explode(' ', $string);
if (count($words) > $length)
return implode(' ', array_slice($words, 0, $length)) . $ellipsis;
else
return $string.$ellipsis;
}
}