data format:
$data = [
[
"id"=>"a8856",
"date"=>"20100612"
],
[
"id"=>"a8856",
"date"=>"20180102"
],
[
"id"=>"top856",
"date"=>"20100612"
],
[
"id"=>"c8236",
"date"=>"20100612"
],
[
"id"=>"e2569",
"date"=>"20010612"
],
[
"id"=>"e2569",
"date"=>"20150825"
]
];
ask for help: the id value in the above array may be duplicated, but the date value is unique. I want to go to multiple entries to keep the latest record, for example: 2 id are all e2569, but one date is 2001 and the other is 2015, delete 2001 and keep 2015, there may be multiple duplicate id values.
is there anything that can solve this problem, such as online, demo, thank you, or built-in functions?