RE: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-18 Thread Mårten Gustafsson
> -Original Message- > From: Hartmut Holzgraefe [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 17, 2002 11:07 AM > To: [EMAIL PROTECTED] > Cc: PHP-Dev > Subject: Re: [PHP-DEV] Proposed additional behaviour of str_replace() > > > Mårten Gustafsson wrot

RE: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-18 Thread Mårten Gustafsson
> On Wed, Apr 17, 2002 at 01:01:29AM +0200, Mårten Gustafsson wrote : > > Is there anyone else than me that would find it useful to be able to do: > > > > > $string = 'foo bar'; > > $replacements = array( > > 'foo' => 'FOO', > > 'bar' => 'BAR'); > > // Prints "FOO BAR" > > echo str_

Re: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-18 Thread Hartmut Holzgraefe
Mårten Gustafsson wrote: > Ehrm. I should probably read through the entire manual, every day :) wouldn't help in this case, the optional behavior of strtr() is really hard to find (even i as a member of a doc team and parttime german manual translater found it only by chance), we should try to fi

Re: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-17 Thread Hartmut Holzgraefe
Mårten Gustafsson wrote: > Is there anyone else than me that would find it useful to be able to do: > [...] have a look at http://php.net/strtr -- Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de/ +49-711-99091-77 -- PHP Development Mailing List To unsubscribe

Re: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-17 Thread Markus Fischer
On Wed, Apr 17, 2002 at 01:01:29AM +0200, Mårten Gustafsson wrote : > Is there anyone else than me that would find it useful to be able to do: > > $string = 'foo bar'; > $replacements = array( > 'foo' => 'FOO', > 'bar' => 'BAR'); > // Prints "FOO BAR" > echo str_replace($replace

[PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-16 Thread Mårten Gustafsson
Is there anyone else than me that would find it useful to be able to do: 'FOO', 'bar' => 'BAR'); // Prints "FOO BAR" echo str_replace($replacements, $string); ?> With current behaviour one has to do: 'FOO', 'bar' => 'BAR'); // Prints "FOO BAR" echo str_replace(array_keys($