How do i spesify an array key when adding array elements dynamically in php?
E.g.
I am doing:
$blah="hello";
$array1[$blah][] = "hello2";
But when i do
print_r($array1);
it does not do
hello => hello2
but
[0] => hello2
how can i work around this?
E.g.
I am doing:
$blah="hello";
$array1[$blah][] = "hello2";
But when i do
print_r($array1);
it does not do
hello => hello2
but
[0] => hello2
how can i work around this?
Comment