Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    text wrapping for a chat

    What i basically want to do is make it so when someone posts something really long(like a link), it wont stretch the chat and make it so you have to scroll to see everything..

    I was thinking something like:

    if(strlen($text)>50){
    split $text somehow
    }

    How would that be accomplished?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    PHP is so awesome, it has a function for you already:

    wordwrap()

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i love you :P haha thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •