I have a quick question please Ladies & Gents if you dont mind, When I am displaying my data on page I sometimes use nl2br to help with the output format.

$cpstatement = nl2br($cpstatement);

On one of my query results that I echo out has {$row->duties} - This allows me to echo out the data from the duites column from my database.

How can I add the nl2br to {$row->duties} to help with how the database is presented and displayed on my results.
Thanks...

Recommended Answers

probably your newlines aren't being escaped properly when writing or reading from/to the db

Jump to Post

All 2 Replies

probably your newlines aren't being escaped properly when writing or reading from/to the db

I'm confused by your question.

echo nl2br($row->duties);

You can't just do that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.