Syntax
extract ( array &$array [, int $flags = EXTR_OVERWRITE [, string $prefix = NULL ]] )
Description
extract — Import variables into the current symbol table from an array, Checks each key to see whether it has a valid variable name. It also checks for collisions with existing variables in the symbol table.
Code
<?php
/* Suppose that $var_array is an array returned from
wddx_deserialize */
$size = "large";
$var_array = array("color" => "blue",
"size" => "medium",
"shape" => "sphere");
extract($var_array, EXTR_PREFIX_SAME, "wddx");
echo "$color, $size, $shape, $wddx_size\n";
?>
output: blue, large, sphere, medium