View Single Post

  #2 (permalink)  
Old 01-24-2007
Paul Novitski
 
Posts: n/a
Default Re: [PHP] Splitting long text

At 1/23/2007 05:52 PM, Skip Evans wrote:
>I have a requirement to take a large amount of text, a story
>submitted to a competition, and split into displayable chunks of 600
>words each.



You can explode a text into an array of words, slice off a
600-element array, and implode the result back into text.

http://php.net/explode
http://php.net/implode
http://php.net/array-slice

Regards,

Paul
__________________________

Juniper Webcraft Ltd.
http://juniperwebcraft.com
Reply With Quote