FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » str_replace does not like empty quotes
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: str_replace does not like empty quotes [message #186208 is a reply to message #186203] Fri, 20 June 2014 11:48 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
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".

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PDO fetch with SQL server
Next Topic: Putting it all together
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 10:19:52 GMT 2024

Total time taken to generate the page: 0.04544 seconds