Hi,
As part of a large application I have an existing array with key value pairs such as:
$scores2 = array(
array(
'player' => 'chris',
'sheet' => '9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,0'
),
);
This array will be saved in a session.
I then receive new data for ‘chris’ in the form of a new array:
$scores2 = array(
array(
'player' => 'chris',
'sheet' => '1,2,3,4,5'
),
);
So i need to append the new data ‘1,2,3,4,5’ to the original array to end up with:
$scores2 = array(
array(
'player' => 'chris,
'sheet' => '9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,0,1,2,3,4,5'
),
);
I thought this was possible with array_merge but apparently it is not as i cannot get it to work. Any suggestions?