How do I turn this:
$keys=array(1,8,27);
Into this?
$array=array();
$array[1][8][27]='Hooray!';
I have an array that I need as the keys of a multidimensional array.
In the example:
I am using 1, 8 and 27.
How do I turn this:
$keys=array(1,8,27);
Into this?
$array=array();
$array[1][8][27]='Hooray!';
I have an array that I need as the keys of a multidimensional array.
In the example:
I am using 1, 8 and 27.
I think this would work:
$array[$keys[0]][$keys[1]][$keys[2]] = "Hooray!";
Can't even begin to imagine how to go about making it dynamic though.