[PHP] addslashes() || Why the multiple slashes?

2003-09-09 Thread CF High
Hey All. Simple ? why does PHP add 3 slashes to the following var: $apostrophe = I've got an apostrophe; $slashed = addslashes($apostrophe); echo $slashed; Result: I\\\'ve got an apostrophe. What's up with that -- why not just add a single backslash? --Noah -- -- PHP General Mailing

Re: [PHP] addslashes() || Why the multiple slashes?

2003-09-09 Thread Marek Kilimajer
WFM. Is $apostrophe from a REQUEST variable. Then it already is addslashed, as your magic_quotes_gpc is on in php.ini. CF High wrote: Hey All. Simple ? why does PHP add 3 slashes to the following var: $apostrophe = I've got an apostrophe; $slashed = addslashes($apostrophe); echo $slashed;

Re: [PHP] addslashes() || Why the multiple slashes?

2003-09-09 Thread Brad Pauly
CF High wrote: why does PHP add 3 slashes to the following var: $apostrophe = I've got an apostrophe; $slashed = addslashes($apostrophe); echo $slashed; Result: I\\\'ve got an apostrophe. What's up with that -- why not just add a single backslash? Do you have gpc_magic_quotes enabled? -

Re: [PHP] addslashes() || Why the multiple slashes?

2003-09-09 Thread Brad Pauly
Brad Pauly wrote: CF High wrote: why does PHP add 3 slashes to the following var: $apostrophe = I've got an apostrophe; $slashed = addslashes($apostrophe); echo $slashed; Result: I\\\'ve got an apostrophe. What's up with that -- why not just add a single backslash? Do you have