php array key value and function code example
Example 1: php variables as keys in arrays
$id = 1;
$age = 2;
$sort = "id"; // or "age";
$Key = $$sort;
$arr = array($Key => 'string');
print_r($arr);
Example 2: php take out 2 level array key value
foreach($bigArray as $array){
foreach($array as $key=>$value){
echo $key;
}
}
#If if helps you give it Thumbs up