Hello Ryan,

Thursday, March 11, 2004, 3:29:32 PM, you wrote:

>> Does this look nicer?
>>
>> $fields = array('username', 'password', ...);
>> foreach($fields as $key) $$key = $_POST[$key];

RA> A bit confused...whats the meaning of the double $ for "key"...or is that a
RA> typo?

It creates a variable variable :)
A variable variable takes the value of a variable and treats that as the name of a 
variable.

See Chapter 7 (Variables) of the PHP manual.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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

Reply via email to