Formatting

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
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Formatting

Post by Nunners »

This is a really simple question.... I've got some un-html-formatted text i.e.:
Following a consultation event 7 courses have been held. Courses have included: Yoghurt, ice cream, cheese, crème fresh. These have been supported by hygiene and packaging courses.

The project is also investigating the financing of a dairy wagon to allow for on farm processing. This has the benefit of allowing the businesses to experiment and develop innovative products in an ‘incubator unit’ without incurring massive capital expenditure. This may incentivise producers to develop distinctive products from different farms thus increasing the available product range. A key benefit of the wagon is that it will allow for one to one training and mentoring thus addressing a major issue regarding take up of training.
in a database (TEXT field), and want to display it with the line breaks etc. etc.

At the moment, it just produces it as straight text, with no line-breaks....

I'm sure there's a really simple way of doing this, but can't think how.

Thanks
Nunners :D
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

See [php_man]nl2br[/php_man]
Last edited by McGruff on Tue Aug 09, 2005 7:06 pm, edited 1 time in total.
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

I knew it was simple!

Thanks Jason....
Post Reply