Re: Creating a varable with a name held in a string

From: Date: Fri, 11 Feb 2005 04:08:22 +0000
Subject: Re: Creating a varable with a name held in a string
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-208512@lists.php.net to get a copy of this message
Randy Johnson wrote:
I like to do this: foreach( $row as $key=>$val) { $$key = $row[$key];
       }
You're just recreating a slower version of extract()... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#208512) next »