PHP Extract

This is by no means rocket science, but it’s quite useful in some cases. Let’s say you have an array and you want to access each key as a unique variable. You can do it like this:

$my_array = array("a" => "Cat","b" => "Dog", "c" => "Horse");
extract($my_array);

echo $a;

OUTPUT:
....
Cat

php.net/manual/en/function.extract.php