Line breaks in tables

mrjack

VIP Member
Don't know if this is the right place but I couldn't find any forum about programming.

So I have this guestbook I'm working on in PHP. It's working perfectly but in order to make it easier for the user when reading the entries I'd like to get line breaks when the text reaches a certain point automatically.

I've found the tags that allow line breaks when using the <textarea></textarea> tags, but that's only for input and right now it's not working in that case either.

But the output that the PHP script prints is done with simple echo commands into tables. And I'm having trouble finding proper tags or a way to program the line breaks. Even my teacher at school, who knows quite a bit about computers and programming (and he's no old incompetent fart), has been having a bit of trouble with this.
 
Last edited:
I don't know much about the way PHP works, but I am pretty good at HTML.

My suggestion would be to find a way to count the number of characters before you want to put in a line break. But I guess you would also have to account for it to only put in the line break after a period.

Once you figure out a way to do that, all you need is one or two <br> tags to make your spaces.

Not sure if this helps or not.
 
Back
Top