quick question

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: macek, egami, gesf

Post Reply
User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

str_replace() and nl2br()

Post by gesf » Thu Aug 05, 2004 3:46 am

You´re looking for php's str_replace() and/or nl2br() functions ;)

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Post by swirlee » Thu Aug 05, 2004 5:40 am

phpMyAdmin does not do any formatting to your records.

The trouble is that you have newlines ("\n") in your text, and you're expecting them to display in your browser as newlines. Browsers don't do that -- you have to use HTML to format your text. If you do View > Source in the browser, you'll see that the newlines are there, they just aren't displayed (because they're not supposed to be). That's where nl2br() comes in. It converts newlines to HTML line breaks so they'll be displayed.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest