creating array with keys from arrays in php code example
Example 1: php array
$array = ['cheese', 'ham', 'potato'];
var_dump($array);
Example 2: php define variables from array associative
<?php
$array = [
'key1' => 'foo',
'key2' => 'bar',
];
extract($array);
echo $key1; //print foo
echo $key2; //print bar
?>