I have an array as:
$check = [
0 => [
'id' => '1',
'value' => 'true'
]
1 => [
'id' => '1',
'value' => 'false'
]
2 => [
'id' => '1',
'value' => 'true'
]
3 => [
'id' => '2',
'value' => 'true'
]
]
Now I want to convert this array into
$check = [
0 => [
'id' => '1',
'value' => 'true'
]
1 => [
'id' => '2',
'value' => 'true'
]
]
i.e if the indexes of my check[]
has same id
value then delete all of them except for any one.