Long text line break function?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Long text line break function?

Post by AGISB »

I want to print out a long text from a MySQL database.

For HTML I place it in a table and get the text wraps into the next line

If I print the text the line cuts of at the pageend so I have to put a line feed at a maximum displayed letters (after the last word)

I can just count and divide into multiple strings but is there a function that does this automatically?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]wordwrap[/php_man]
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

CSS is another solution. You can set different styles for different media.
Post Reply