Create variables from assosiated array

[php]
$parties_array = get_array_from_text($parties);
while (list($key, $value) = each($parties_array))
{
$$key = $value;
}
[/php]