Mecha CMS

To::excerpt()

Convert string into excerpt text.

2.2.0Static

To::excerpt(string $in, $html = true, int $x = 200);
To::excerpt(string $in, $html = true, array $x = [200, '…']);

Example:

$A = '<p>' . To::excerpt($page->content) . '</p>';