note 14731 added to function.mysql-fetch-assoc.php
| From: | SL at sentientnetware dot com | Date: | Sun, 12 Aug 2001 18:06:26 +0000 |
| Subject: | note 14731 added to function.mysql-fetch-assoc.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16615@lists.php.net to get a copy of this message | ||
PHP already has a function for the last 2 comments.
extract( $row );
will create local variables from an assoc array using the key for the var name.
$foo["bar"] = 1;
extract($foo);
echo $bar; // is 1
http://www.php.net/manual/en/function.mysql-fetch-assoc.php