note 19356 added to function.str-replace

From: Date: Mon, 25 Feb 2002 11:04:55 +0000
Subject: note 19356 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-27005@lists.php.net to get a copy of this message
When using str_replace with an associative array as the subject, does it not return an associative array? And, out of curiosity, are the key names run through the function as well? For instance: extract(str_replace(",","",$result_row)); ...to strip any commas out of a row of values I've just pulled from the db using mysql_fetch_array, then to register those keys as variables in the symbol table. I end up with empty values and... Warning: Wrong datatype in call to extract() in *.php on line 19 Before I added the str_replace function, everything was behaving normally. The docs don't mention that str_replace might return a different type of array, so I'm confused. Sorry if this falls into the "support" category, but hopefully this will prompt some clarification in the docs if it's a real issue, and not my foible. -- http://www.php.net/manual/en/function.str-replace.php http://master.php.net/manage/user-notes.php?action=edit+19356 http://master.php.net/manage/user-notes.php?action=delete+19356 http://master.php.net/manage/user-notes.php?action=reject+19356

« previous php.notes (#27005) next »