I haven't been able to find any leads on this in the archives, nor in the
documentation, so here goes.

When feeding an associative array to str_replace as the subject, does it
still return an associative array?

My instance:

extract(str_replace(",","",$result_row));

After pulling an associative array using mysql_fetch_array(), I can feed
it to extract() by itself and it works as predicted and documented.  
However, if I do the above, where I want to make sure that the text fields
(from the db) that I'm using have the commas stripped out of them,
extract() chokes with a "Warning: Bad datatype for extract()".

I'm sure there are no commas in the key names, so those shouldn't be
altered.  My only assumption is that str_replace returns array
results without keys, even though it should take and return mixed
subjects, correct?

I may just be missing something obvious here, so have pity on a poor soul.
You've all been there.  (And one of the problems may be that I'm working
off of PHP 4.0.3...)


$leepless_in_seattle(me);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to