Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display an enter as a <br> (from the mysql database) 1

Status
Not open for further replies.

lukelukeluke

Technical User
Joined
Dec 23, 2003
Messages
117
Location
CH
hi there!

I have build a little entry form and a display site with php / mysql.
I've found out that if you enter thing like this into the databse: <?php ?>, it wont be displayed because its going to be integrated as a script into the site.
Further i found out that you can use htmlentities() to display database content correctly.
But i still have a problem: An enter is not displayed as a <br>. what can i do to let an entry like this:
Code:
hello

world
be entered into the html code file as this:
Code:
hello<br>
<br>
world
to make it display correctly?
Thanks alot for your ideas!
best regards, luke
 
this helped me very much. Thanks alot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top