There is a collection with documents, in each document there is an array field, a document I find across the field 'key', then in each found document I select an array field 'obyav', with the aim then to combine these arrays. I do it like this in a primitive way:
$dok1 = $collection->findOne(array('key' => $key1)); $dok2 = $collection->findOne(array('key' => $key2)); $dok3 = $collection->findOne(array('key' => $key3)); $mas1 = $dok1['obyav']; $mas2 = $dok2['obyav']; $mas3 = $dok3['obyav']; It turns out three requests to Mongo, you can do it like that for one request or more beautifully. So that at the exit I had a combined array of $ mas1 $ mas2 $ mas3?