Re: Best way to remove slashes?
| From: | Brent Baisley | Date: | Wed, 02 Feb 2005 14:41:10 +0000 |
| Subject: | Re: Best way to remove slashes? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38427@lists.php.net to get a copy of this message | ||
It looks like you might be running addslashes multiple times, which means you would need to run stripslashes multiple times. This usually happens when you run addslashes on the data before entering into the database, but also have magic quotes enabled (which does the same thing). Use get_magic_quotes_gpc to test if magic quotes if enabled before running your own addslashes, or just turn off magic quotes.
Otherwise run stripslashes a few times (kind of messy).
On Feb 1, 2005, at 6:28 PM, Chris Payne wrote:
Hi there everyone, What’s the best way to remove slashes to stop the following from being output from a string: City = HYPERLINK "file:///\\\\\\'Alliance\\"\\\'Alliance\\\' Say the string is called $city, I tried the following: Stripslashes($city); but it didn’t seem to work? Chris -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.4 - Release Date: 2/1/2005 -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577