Re: Patch to extract()
| From: | Hartmut Holzgraefe | Date: | Thu, 28 Feb 2002 08:45:00 +0000 |
| Subject: | Re: Patch to extract() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80502@lists.php.net to get a copy of this message | ||
Richard Heyes wrote:
Anyone interested in this patch?not really, i'd use foreach and unset on the array before extracting, far less obfuscated than the callback approach or, if the array should not be modifiert: function callback(&$value, $key) { if(preg_match('/^var/', $key)) {
$GLOBALS[$key] = $value;} } array_walk($array,"callback"); -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77 Wir stellen für Sie aus auf der CeBIT 2002 und freuen uns in Halle 6 auf Ihren Besuch am Stand H 18