Check the manual for sure, but assuming: $cookie = array("foo" => "bar", "red" => "blue")
once this is done you'll have the following variable defined: $foo = "bar"; $red = "blue"; I think that's how it works anyway. On Wed, 12 Feb 2003 [EMAIL PROTECTED] wrote: > I'm trying to piece apart someone's code to see exactly what it is they're > trying to do - This code was written for PHP 3.x, so it's not quite as > nice as 4 (with $_POST, $_GET, $_SESSION, etc). There's this one part in > particular that I have no idea what's trying to be done: > > if (isset ($cookie)) { > while (list ($name, $value) = each ($cookie)) { > $$name = $value; > } > } > > I'm assuming the $cookie array has cookie info stored in it, and it's > trying to pull the data out of the array. The 2 parts of this I don't > really understand are lines 2 and 3, 3 in particular. I'm guessing it's > assigning $name the index, $value the element - What's really stumping me > here though is the $$name = $value. What is a variable with $$ in front > of it signify, and what is this trying to do? Any thoughts on this one? > Thanks. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php