str_replace() not accepting arrays?

From: Date: Mon, 01 Jul 2002 20:24:38 +0000
Subject: str_replace() not accepting arrays?
Groups: php.general 
Request: Send a blank email to php-general+get-104780@lists.php.net to get a copy of this message
Hi, In the documentation it says that str_replace() accepts an array as its subject. I have been trying to use it with a multidimensional array, but keep on getting the following error: Notice: Array to string conversion in c:\code\xml\index.php on line 85 And my arrays are flattened :-( $foo = array( '0' => array('foo => 'bar'), '1' => array('fff' => 'foooo', 'feen' => 'foo') ); Returns an array like Array ( [0] => Array [1] => ) when printed out. Is the documentation wrong or is PHP 4.2.1 broken? Thanks Peter

« previous php.general (#104780) next »