[] replacing quotes and single quotes

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
cmartin19
Forum Newbie
Posts: 5
Joined: Thu May 15, 2008 8:07 pm

[] replacing quotes and single quotes

Post by cmartin19 »

Hello, I'm writing data to a mysql table and using the nl2br() function to convert new lines to <br/> so the browser can display the new lines properly when the data is sent to the browser. The problem is all double quotation and single quotation marks show up as � instead of the quotation marks that were originally entered into the database using textarea. Is there a function in php that will convert the small boxes back to the proper quotation marks when the data is queried and displayed in the browser? Thanks, cm 8O
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: [] replacing quotes and single quotes

Post by jaoudestudios »

dont use nl2br() before you go to the database, use it when you display the info to the screen!
Post Reply