Thursday 1 September 2011

Split / Chunk / Capture complete words using substr() in PHP, limit by word

For [ How to capture complete words using substr() in PHP, limit by word? ]

$sub_words = explode('|', wordwrap(nl2br($m->Message), 50, '|')); 
echo $sub_words[0];