У меня есть два разных многомерных массива следующим образом:
Array //1st_array
(
[0] => Array
(
[timestamp] => 7/10/2018 15:24:06
[username] => giakhang
[status] =>
)
[1] => Array
(
[timestamp] => 8/10/2018 5:11:25
[username] => haophan
[status] =>
)
[2] => Array
(
[timestamp] => 8/10/2018 6:38:18
[username] => TTQ1504
[status] =>
)
[3] => Array
(
[timestamp] => 08/10/2018 7:04:20
[username] => btcgainer24724
[status] =>
)
)
Array //2nd_array
(
[0] => Array
(
[timestamp] => 8/10/2018 5:10:06
[username] => giakhang
)
[1] => Array
(
[timestamp] => 8/10/2018 5:13:25
[username] => btcgainer24724
)
[2] => Array
(
[timestamp] => 8/10/2018 6:44:18
[username] => anggie88
)
[3] => Array
(
[timestamp] => 08/10/2018 7:55:20
[username] => ZeusTrade
)
)
Для каждого того же username
между 1st_array
и 2nd_array
Я хочу изменить status
в 1st_array
и unset
из 2nd_array
объектов, не пересекающихся между ними, следующим образом:
Array //1st_array
(
[0] => Array
(
[timestamp] => 7/10/2018 15:24:06
[username] => giakhang
[status] => Yes
)
[1] => Array
(
[timestamp] => 8/10/2018 5:11:25
[username] => haophan
[status] => No
)
[2] => Array
(
[timestamp] => 8/10/2018 6:38:18
[username] => TTQ1504
[status] => No
)
[3] => Array
(
[timestamp] => 08/10/2018 7:04:20
[username] => btcgainer24724
[status] => Yes
)
)
Array //2nd_array
(
[0] => Array
(
[timestamp] => 8/10/2018 5:10:06
[username] => giakhang
)
[1] => Array
(
[timestamp] => 8/10/2018 5:13:25
[username] => btcgainer24724
)
)
Как я могу пересечь эти многомерные массивы?