Hi Everyone, I have a strange problem with how my content is being displayed,

I keep seeing \'s throughout my content that is being displayed from my database.

I have tried the following but none seem to be helping me.

                            $ball = htmlspecialchars($row->twh_ball);
                            $ball = str_replace("`", "", $ball);
                            $ball = str_replace('"', '"', $ball);
                            $ball = nl2br($ball);

Any help would be much appreciated

Recommended Answers

All 2 Replies

check the content of the db field in what format are those chars stored

Member Avatar for diafol

As jst...

You don't mention what is being stored in the DB.
What output are you hoping to get out to the screen?

That character is html-encoded single quote ('), but for some reason with a backslash in front of it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.