I have a Multidimensional array.
$playerid = 5;
$finaldraft = array();
$playerchoice = some number pulled from the database
$finaldraft[] = array($playerid, array($playerchoice));
This store the information properly, but later on in the code I need to add onto the array inside the first one. I can't figure out how to add onto the interior array. Ive tried running
$playerid = 5;
$player2ndchoice = another number pulled from the database
$finaldraft[] = array($playerid, array($player2ndchoice));
But all this does is just a a row in the main array.
As you can see from the output:
Array
(
[0] => Array
(
[0] => 10
[1] => Array
(
[0] => 5
)
)
[1] => Array
(
[0] => 10
[1] => Array
(
[0] => 12
)
)
)
Any ideas?
Does this even make sense. Let me know if it does not and I'll try to explain it another way.