Hello,
I quite puzzled with this problem.
I need to add new elements to the corresponding keys in the associative array.
Here is my code
//to add a star
$player=array();
$player['name']="jack";
$player['height']="tall";
$player['weight']="heavy";
$player['name']="joe";
$player['height']="short";
$player['weight']="light";
print_r($player);
I would like to output three keys with the corresponding new elements.
$player['name'] should have jack and joe
I don't want to create a new key['0']
I've tried array_push($player['name'], "joe") which doesn't work.
Thank for you time in reading this.