php extract function code example
Example 1: php array extract value
<?php
$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));
?>
Example 2: extract($user_input); alternative php
$info = array('Doina', 'brown', 'long');
// Listing all the variables
list($she, $color, $hear) = $info;
echo "$she has $color eyes color and $hear black hair.\n";