Skip to content

TheoKouzelis/text-truncator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Truncator

Limit paragraphs of text and append "read more" links or ellipses.

Usage

require "vendor/autoload.php";

$truncator = new Kouz\TextTruncator();
$truncator->setLimit(10);
$truncator->setEnding("...");

echo $truncator->limitChars("Limit text to 10 characters");

//Limit text...

echo $truncator->limitWords("Limit text to ten words, six seven eight nine ten eleven");

//Limit text to ten words, six seven eight nine ten...

About

Limit text and append read more links or ellipses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages