note 14085 deleted from function.extract by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 19:58:30 +0000 |
| Subject: | note 14085 deleted from function.extract by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22157@lists.php.net to get a copy of this message | ||
Note, that if extract() is used inside a function, the extracted global variables are automatically
available inside the function without the need for the "global" statement.
Example
$arr = array("fruit" => "apple", "cake" =>
"cheesecake");
function foo() {
global $arr;
extract($arr);
echo $fruit; // This will produce "apple";
}