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
str_replace does not like empty quotes [message #186189] Thu, 19 June 2014 23:33 Go to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
$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!

<quote>
If search and replace are arrays, then str_replace() takes a value from
each array and uses them to search and replace on subject. If replace has
fewer values than search, then an empty string is used for the rest of
replacement values. If search is an array and replace is a string, then
this replacement string is used for every value of search. The converse
would not make sense, though.
</quote>
[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 Apr 28 11:41:50 GMT 2024

Total time taken to generate the page: 0.05737 seconds