Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Displaying database contents on the web
July 6, 2006, 8:38 pm
rate this thread
I put some weird characters in for testing.
When I had <b> in the comment field it turned all text after that bold.
I tried using htmlspecialchars() & htmlentities() but then I got
"”" instead of a quote.
The code I'm using to display the text in HTML is:
<? echo(htmlentities($ResultOne['Comment'])); ?>
Do I need to change the HTML code or is there a PHP function that will
handle all weird characters in this situation? Please keep in mind I'm
fairly new to this, so if there's an obvious answer just point me in
the right direction.
Someone had suggested using a regex function but I couldn't find that
in my manual, I assumed they were referring to the htmlspecialchars()