Code |
Context$string = "<p>Brand new chairs for sale, see pic and contact me if interested. OBO <br />
jenmath210@gmail.com <br />
<br />
Thanks</p>"
$length = 100
$delim = "..."
$str_length = 127
$matches = array()
{
preg_match('/(.{' . $length . '}.*?)\b/', $string, $matches);
return rtrim($matches[1]) . $delim;
HtmlHelper::WordCut() - CORE/cake/libs/view/helpers/html.php, line 826
include - APP/views/classified/sublist.thtml, line 67
View::_render() - CORE/cake/libs/view/view.php, line 648
View::render() - CORE/cake/libs/view/view.php, line 336
Controller::render() - CORE/cake/libs/controller/controller.php, line 712
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 243
[main] - APP/webroot/index.php, line 84
...