Page 1 of 1

How should I deal with too many characters in one line?

Posted: Wed Aug 02, 2006 5:06 pm
by Locust
I have a 'shout box' where users can type a message, click submit, and it is displayed on the page from the information sent to my database. The area where it is displayed, however is a rather narrow table, only capable of holding around 20-25 characters before it reaches the edge of the table. The way HTML is displayed is that if something is too long, it expands the table automatically.

For example, If I was to type ############### another 20 times, the table in which I have posted will expand and skew the page.

Should I use Regex in an attempt to ensure this doesn't happen?

Posted: Wed Aug 02, 2006 5:08 pm
by feyd
wordwrap() and set some overflow style points.

Posted: Wed Aug 02, 2006 5:19 pm
by Locust
Thanks, that's good.

Is there anyway I can make wordwrap() ONLY cut? I don't want it to wrap unless a string is longer than ~15 chars.