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 #186201 is a reply to message #186189] Fri, 20 June 2014 03:25 Go to previous messageGo to previous message
Doug Miller is currently offline  Doug Miller
Messages: 171
Registered: August 2011
Karma:
Senior Member
richard <noreply(at)example(dot)com> wrote in news:1kcemjreijezv$.k2q3x4bl6eoc.dlg@
40tude.net:

> $a=str_replace($a,"\","");
>
> This generates the error: Unexpected "".
>
> http://www.php.net//manual/en/function.str-replace.php
>
> While here in the manual, they do precisely the same thing!

No, they do not. RTFM, RtS.

<quote>
mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )

This function returns a string or an array with all occurrences of search in subject replaced
with the given replace value.
</quote>

Now look at what you wrote, and compare it to the description in the manual.
[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: Sat Nov 23 23:14:13 GMT 2024

Total time taken to generate the page: 0.04358 seconds