03-19-2008, 08:33 PM
|
#11 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Salathe
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);
|
Less lines of code? :P
__________________
VillageIdiot can have my babbies ;d
|
|
|
|