Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: str_replace does not like empty quotes Date: Tue, 24 Jun 2014 10:44:51 +0200 Lines: 25 Message-ID: <53A93A83.6060002@arnowelzel.de> References: <1kcemjreijezv$.k2q3x4bl6eoc.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net KpOPe98D1OmIBilakRnW1gZLunhaMfDJBRLrnUEwlt5J2kwu9a Cancel-Lock: sha1:bCqc7EcBE1Vanaa/hjs1gRM+2jg= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: X-Enigmail-Version: 1.6 Xref: csiph.com comp.lang.php:14026 Am 2014-06-24 08:13, schrieb Olaf Schmitt: > Am 20.06.2014 01:33, schrieb richard: >> $a=str_replace($a,"\",""); > $a=str_replace($a,"\\",""); JFTR: The order is search, replace, subject and not subject, search, replace. So the right solution is: $a=str_replace("\\", "", $a); Or just use: $a = stripslashes($a); ;-) -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de