Text 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
Ben11858
Forum Newbie
Posts: 16
Joined: Sat Nov 28, 2009 11:27 am

Text formatting

Post by Ben11858 »

Hey all...

Quick one.. I've setup a textarea for a user to enter quite a lot of text. That text is sent to my database and stored.. In the database it remains in its formatted state with like newlines and return.

I have a select statement to get the data out and echo it into a html document that can be printed. My problem is that when its echo'd at this point it is no longer in its formatted state.. All just one big chuck of text without new lines. What is easiest and efficient way of adding newlines into the text so its formatted and easier to read??

Cheers lads..
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Text formatting

Post by jackpf »

Ben11858
Forum Newbie
Posts: 16
Joined: Sat Nov 28, 2009 11:27 am

Re: Text formatting

Post by Ben11858 »

Ah yeah, exactly... couldnt find that one, but cheers, works perfectly...
Post Reply