I'm trying to do some searching through an array, and append one of the pieces. I am working creating one, complete array w/ all the information from two different databases. So when I query each table, I create a multi-dimensional array like this:
Array
(
[0] => Array
(
[contact_id] => 61293
[website] =>
[source] =>
[model] => sdgsdg, TEST BBBB
)
[1] => Array
(
[contact_id] => 61293
[segment_id] => 3
[notes] => this is just a test...
[communication] => all
)
)
The first one is being created from table a, and then I query table b. So what I'd like to do, as I'm reading through the results of my query of table b is look to see if that contact_id already exists in the array. And if it does, just append the the notes and communication elements from what I presently have in the second element of the array to the first. Does that make sense?
I know that I'll have to use the array_search function, but I'm not sure how to implement. Are there any PHP array experts out there that could give me a hand?