I have a code snippet written in PHP that pulls a block of text from a database and sends it out to a widget on a webpage. The original block of text can be a lengthy artic
I believe this is the easiest way to do it:
$lines = explode('♦♣♠',wordwrap($string, $length, '♦♣♠')); $newstring = $lines[0] . ' • • •';
I'm using the special characters to split the text and cut it.