Hi,
nl2br($text) should do it!
Chris C
I have some text stored in a mysql database, it is actually some content from a wordpress post that I want to manipulate.
In wordpress the text appears on the postings page as
which is how I want it, but when I use PHP to select the details from the database and put it in a variable, that I then echo, I end up with:Text text text text text, text text. Text text text text text, text text
Text text text text text, text text. Text text text text text, text text, Text text text text text, text text.
so it loses the line breaks, what do I need to do with PHP to maintain the line breaks or to code them into what is put in the variable.Text text text text text, text text. Text text text text text, text text Text text text text text, text text. Text text text text text, text text, Text text text text text, text text.
Anyone got any ideas? Much appreciated.
affiliates4u Fantasy Football Winner 2007/08
Hi,
nl2br($text) should do it!
Chris C
sunshine.co.uk - Cheap Holidays, Hotels and Flights on Paid on Results
email: chris.c [at] sunshine.co.uk
Affiliate Area
bonvoyage.co.uk - Cruise Deals coming soon
quality thanks Chris & Ste
using echo nl2br($yourvariablename);
works a treat !![]()
affiliates4u Fantasy Football Winner 2007/08
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks