I'm trying to understand PHP array methods, so Id prefer using the array methods to solve this.
Here is my data:
$dataA =>
array
0 =>
array
'type' => string 'name' (length=4)
'key' => string 'keywords' (length=8)
'content' => string 'keywordA' (length=14)
$dataB =>
array
1 =>
array
'type' => string 'name' (length=4)
'key' => string 'keywords' (length=8)
'content' => string 'keywordB' (length=14)
What I'd like to do is have the two arrays merged and the final content
key be:
$finalData =>
array
0 =>
array
'type' => string 'name' (length=4)
'key' => string 'keywords' (length=8)
'content' => string 'keywordB' (length=14)
^-- notice here that the content has changed based on the fact that 'key' for both is 'keywords'
As you can see, the final content value is from $dataB.