03-19-2008, 08:31 PM
|
#10 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
If you were going to use an associative array, then extract() would be better than the foreach loop. Though, I'm still struggling to see the purpose here. Why not just assign the values 'normally'... keep it simple.
Extract
PHP Code:
$vars = array ( 'foo' => 'bar', 'baz' => 'foo' ); extract($vars); var_dump($foo, $baz);
|
|
|
|