[FX.php List] Keeping text formatting from a FM field
Tim 'Webko' Booth
tim at nicheit.com.au
Tue May 27 18:24:59 MDT 2008
On 28/05/2008, at 10:12 AM, Bob Patin wrote:
> I'm trying to display text just as the client entered it, but when I
> try nl2br() I get the carriage returns and not the bolding.
>
> Then I tried htmlentities(nl2br()) but that didn't work, and in fact
> removed the carriage returns.
>
> I searched my emails but couldn't find the solution; how do I do this?
I don't think you can... The contents of a field, when you look in the
array, contain no stylistic elements, regardless of what is applied to
the field. They do contain any returns that were part of the field
contents.
You'd need to add html markup to the field that can then be
interpreted back as part of the field to the web.
Mind you, if anyone can think of a way to do this, it would be very
useful...
Of course, if the initial information is being entered via the web,
you can use something like fckEditor to add the markup at the point of
data entry.
Cheers
webko
More information about the FX.php_List
mailing list