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 #186321 is a reply to message #186320] Tue, 24 June 2014 19:53 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Denis McMahon wrote:

> On Tue, 24 Jun 2014 10:44:51 +0200, Arno Welzel wrote:
>
>> 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.
>
> Yes, but richard is using his own definitions for search, replace and
> subject, which only align with the php in the 42nd alternative universe
> across.

Or maybe he's doing something like the following:

runkit_function_rename('str_replace', 'php_str_replace');
runkit_function_add(
'str_replace', '$subject, $search, $replace',
'return php_str_replace($search, $replace, $subject);'
);

echo str_replace('something', 'some', 'any');

SCNR.

--
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: Thu Nov 21 16:01:31 GMT 2024

Total time taken to generate the page: 0.03917 seconds