FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Converting \" into "...





Tartaglia
I have an update system that works well. Thing is, when you type either " or ' in a post, it shows up as \" or \'. Is there a way to change it back to exclude the slash?
MrBlueSky
If only the characters ", ', \ and the NULL character are escaped using backslashes you can use stripslashes():

Code:


$text = stripslashes($text);

Tartaglia
Thank you. That solved my problem. I have a lot to learn about php...
gerpg
Code:
stripslashes();


the reason it adds the slashes is to prevent the php from reading the quotes as part of the code and then messing up all the tags you have the data inside.
Stubru Freak
You can also just disable that by placing this line in your .htaccess file:
php_flag magic_quotes_gpc Off

It will soon be removed from the official PHP distribution, so get used to it.
Related topics
Support Danish
Problem with FTP
Smart Pricing
Layout Contest ~~~200FRIH for winner + more benifits~~~
related to points
What is fire
Microsoft plans to build more Unix features into future vers
converting not bootable iso to bootable CD
converting a self made movie
converting time into correct timezone?
Oceans may rise over 4 1/2 feet by 2100
Converting XML into HTML
converting avi to vcd or kvcd
Harry Potter, Are you into it?
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.