Re: str_replace does not like empty quotes [message #186215 is a reply to message #186208] |
Fri, 20 June 2014 15:40 |
Denis McMahon
Messages: 634 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Fri, 20 Jun 2014 13:48:24 +0200, Christoph Michael Becker wrote:
> Geoff Muldoon wrote:
>
>> In article <1kcemjreijezv$(dot)k2q3x4bl6eoc(dot)dlg(at)40tude(dot)net>,
>> noreply(at)example(dot)com says...
>>
>>> $a=str_replace($a,"\","");
>>
>> c) Google PHP stripslashes.
>
> Good point! However, the need for removing backslashes begs the
> question where these backslashes come from in the first place. I
> suppose the cause is <news:itrvizyykmyu$(dot)1m8xc48h8xvgi(dot)dlg(at)40tude(dot)net>:
>
> | $a=str_replace("'","\'",$a);
> | Works just fine.
>
> So much for "works just fine".
As I said upthread, to richard:
There is a reason that you have been advised in the past to use certain
functions and best practices instead of trying to reinvent them yourself.
This is just another example of your persistent refusal to listen to good
advice biting your arse.
--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
|
|
|