Extracting Values from Arrays with extract()
<?php
$customer = array('first' => 'R', 'last' => 'W', 'age' => 24, );
extract($customer);
print "<p>$first $last is $age years old.</p>";
extract($customer, EXTR_PREFIX_ALL, 'cust');
print "<p>$cust_first $cust_last is $cust_age years old.</p>";
?>
Related examples in the same category