Topic: Adding HTML tags to text stored in MySQL for proper display on webpage
Text for a webpage is stored in a MySQL database. In the database, the text is grouped into paragraphs that are separated by linebreaks. How do you take that text from the database and add the HTML tags so that it displays on the webpage properly?
adding <br /> for a single linebreak,
and adding
</p>
<p> for two linebreaks in a row.
If I'm going about this wrong then please correct me. Basically what I'm trying to do is learn how to make my database text display on a webpage with the correct HTML tags.
One of these days, I'm going to upgrade my forum.
D9r.com - homepage
Tucker & DeKalb County, Georgia -- news, events, zoning, politics, directory
HiveMinds.info - International Web Developer Forum (lots of smart folks here)