Page 1 of 1

HELP! how to remove / in apostrophe

Posted: Sun Nov 09, 2008 7:18 pm
by buknoii
hi there! i want to ask if someone in here got an idea on how to remove the \ in apostrophes?

because everytime i access content in my database and if it has ' it also displays \

for example cricket\'s should be crickets

Re: HELP! how to remove / in apostrophe

Posted: Sun Nov 09, 2008 7:23 pm
by Syntac
Use stripslashes(). Or put this at the top of your script (this is the method I recommend):

Code: Select all

set_magic_quotes_runtime( 0 );
You can also mess around with your php.ini file and set everything related to magic_quotes to off.