I have the following array:-
array(3) {
[1]=>
array(1) {
["A"]=>
float(5)
}
[2]=>
array(2) {
["A"]=>
float(1)
["B"]=>
float(3)
}
[3]=>
array(2) {
["A"]=>
float(5)
["B"]=>
float(6)
}
}
And I would like to remove/filter out the nested arrays that only store 1 key so it would end up like this:-
array(2) {
[2]=>
array(2) {
["A"]=>
float(1)
["B"]=>
float(3)
}
[3]=>
array(2) {
["A"]=>
float(5)
["B"]=>
float(6)
}
}
Is there an easy solution/way to do this?
array_filterin combination withcount…