str_split complete words

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    str_split complete words

    ok, i'm trying to figure out how to break a chunk of text into portions less than 100 characters long. i am trying str_split, but that seems to break words up,
    ie if the word 'the' is characters 99 - 101,
    it will end one piece with half a word n leave remaining characters at the start of the next piece...

    trying to figure ot how to keep pieces under 100 characters but with complete words...
    C3 Themes: http://c3themes.wen.ru/index.html
    Find Files: http://mystarter.tk/?goto=X-search

    #2
    See PHP: wordwrap - Manual and don't set the fourth parameter to true.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      thanks so much dude... can't believe i didn't think of wordwrap to make the array, much smarter way to get it done, lol...
      C3 Themes: http://c3themes.wen.ru/index.html
      Find Files: http://mystarter.tk/?goto=X-search

      Comment


        #4
        You are welcome. ;)
        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment

        Working...
        X