PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm pulling text from a database. The text has some html in it. I need to translate special characters like "&" and "<" that might be in the text while allowing things like <b> and <a href> in the body copy. Originally I had coded it like this:
This doesn't work I get <b> <a href> printed to the screen. Is there a way to do this with out doing some sort of REGEX function to replace special chars?