gratsami Posted December 15, 2008 Share Posted December 15, 2008 i faced a problem in my project, it is news and comments .. In news database when i write something between double quotation like "bla bla bla" in the title that is appear error in IE only and appear some problems in the page. so, how i can solve this problem ?? Quote Link to comment https://forums.phpfreaks.com/topic/137039-how-i-can-solve-double-quotation-problem/ Share on other sites More sharing options...
n00bert Posted December 15, 2008 Share Posted December 15, 2008 I think if you posted your source code it would help people solve your problem. But just off the top of my head I think if you add a \ before the quotes that you want to echo to the page it should work. For example if I wanted to echo "Hello World!" to the page I would use this <?php echo "\"Hello World!\""; ?> Quote Link to comment https://forums.phpfreaks.com/topic/137039-how-i-can-solve-double-quotation-problem/#findComment-715728 Share on other sites More sharing options...
PFMaBiSmAd Posted December 15, 2008 Share Posted December 15, 2008 To display content that contains special characters that have meaning in HTML, like quotes, pass your data through the htmlentities() function - http://us3.php.net/manual/en/function.htmlentities.php Quote Link to comment https://forums.phpfreaks.com/topic/137039-how-i-can-solve-double-quotation-problem/#findComment-715735 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.