I have an array, I would like to add another value to it from a database, using the [numo] value to lookup the record, here is the current array:
Array
(
[0] => Array
(
[numo] => 667820161009
)
[1] => Array
(
[numo] => 667820112001
)
and here is what I want to achieve:
Array
(
[0] => Array
(
[id] => 33
[numo] => 667820161009
)
[1] => Array
(
[id] => 34
[numo] => 667820112001
)
I presume that would have to loop through the array, nesting a SELECT query and then insert a new key and value, but I have no idea where to start and have searched and searched.
Many thanks in advance for you help
Stu
My guess without knowing anything about your DB (or specifically the table that this data comes from) would be:
Some PHP to go along with this:
However you can eliminate some queries with: