ID: 10475
Updated by: andrei
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: *Function Specific
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

It works in latest CVS.

$input = array('foobar', 'barhop');
var_dump(implode(' : ', str_replace('bar', '---', $input)));

Output:
string(15) "foo--- : ---hop"


Previous Comments:
---------------------------------------------------------------------------

[2001-04-24 13:06:09] [EMAIL PROTECTED]
See http://sbw.sbw.org/str_replace/.

str_replace(-string-, -string-, -array-) should return an array.

It appears that it does so, but when the returned array is passed to implode or each, 
PHP issues warnings:

"Bad arguments to implode()"

"Variable passed to each() is not an array or object"

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10475&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to