<div class="hover_1">2321321
<div class="hover_2">2321321
<div class="hover_3">2321321
<div class="hovered_1">
<div class="hovered_2">
<div class="hovered_3">
.hover_1:hover ~ .hovered_1 {}
.hover_2:hover ~ .hovered_2 {}
.hover_3:hover ~ .hovered_3 {}
<div class="hover_1">2321321
<div class="hover_2">2321321
<div class="hover_3">2321321
<div class="container">
<div class="hovered_1">
<div class="hovered_2">
<div class="hovered_3">
</div>
.hover_1:hover ~ .container .hovered_1 {}
.hover_2:hover ~ .container .hovered_2 {}
.hover_3:hover ~ .container .hovered_3 {}
$('#notices').html('<div class="alert alert-success alert-dismissible fade show" role="alert">\n' +
' Товар успешно добавлен в корзину' +
' <button type="button" class="close" data-dismiss="alert" aria-label="Close">\n' +
' </button>\n' +
'</div>');
// удалить через пять сек.
setTimeout(function(){
$('#notices').empty();
}, 5000);
@font-face {
font-family: 'MullerBold';
src: url('fonts/MullerBold-normal.woff2') format('woff2');
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: 'MullerBold';
src: url('fonts/MullerBold-bold.woff2') format('woff2');
font-style: normal;
font-weight: 700;
}
<?php
$users = [
[
"userUuid" => "032b83b4-3ad8-33fd-abd3-bfafc5eb23ba",
"name" => "Илья",
],
[
"userUuid" => "59281d2d-d81e-3556-956b-f354fd5e24a9",
"name" => "Олег",
],
];
$resources = [
['user_id' => '59281d2d-d81e-3556-956b-f354fd5e24a9', 'processed' => 145, 'assigned' => 167],
['user_id' => 'e9f60f90-3096-3848-b3e6-094e81f9b022', 'processed' => 15, 'assigned' => 177],
];
$result = array_map(function($user) use ($resources) {
$second = array_filter($resources, function($resource) use ($user) {
return $resource['user_id'] === $user['userUuid'];
});
return array_merge(
$user,
count($second) ? $second[0]: []
);
}, $users);
var_dump($result);
$result = array_map(function($user) use ($resources) {
return array_merge(
$user,
...array_filter($resources, fn($resource) => $resource['user_id'] === $user['userUuid'])
);
}, $users);
var_dump($result);
$result = array_map(fn($u) => array_merge($u, ...array_filter($resources, fn($r) => $r['user_id'] === $u['userUuid'])), $users);
var_dump($result);