select
`offer_id`
from `table`
where
(`property_id` = "1" and `value` ="test11")
OR
(`property_id` = "2" and `value` ="test12")
group by `offer_id`
having count(`id`) = 2
<?php
$a = [
1 => [
3 => [
'logo' => 'logo_3_1',
'cover' => 'cover_3_1',
],
4 => [
]
],
2 => [
5 => [
'logo' => 'logo_5_2',
'cover' => 'cover_5_2',
]
]
];
$logos = [
'logo_3_1' => 'L31',
'logo_4_1' => 'L41',
];
array_walk_recursive($a, function (&$item, $key) use ($logos) {
if (in_array($key, ['logo', 'cover'])) {
if (array_key_exists($item, $logos)) {
$item = $logos[$item];
}
}
});
echo '<pre>';
var_dump($a);
echo '</pre>';