Roee Posted July 19, 2006 Share Posted July 19, 2006 hii tried to write this:[code]$content = $_POST['content']; $match = array('#\[PHP\](.*?)\[\/PHP\]#se'); $replace = array("'<div style=\"margin:25px; margin-top:5px\"><div class=\"smallfont\" style=\"margin-bottom:2px\">PHP code:</div><div class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; overflow:auto\"><code style=\"white-space:nowrap\"><div dir=\"ltr\" style=\"text-align:left;\">'.highlight_string(stripslashes('$1'), true).'</div></code></div></div>'"); $content = preg_replace($match, $replace, $content);[/code]but if i try to write a " it makes mysql error:[b]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\' (ASCII=92) state=1[/b]why?thanks Quote Link to comment Share on other sites More sharing options...
Roee Posted July 20, 2006 Author Share Posted July 20, 2006 help!! Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted July 20, 2006 Share Posted July 20, 2006 it's a mysql error, not php error... Quote Link to comment 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.