Here I want to remove last array from below (this is always last array that is set dynamically):
array(1) {
["file-1573204001988"]=>
array(3) {
[0]=>
array(5) {
["name"]=>
string(7) "abc.png"
["type"]=>
string(9) "image/png"
["tmp_name"]=>
string(14) "/tmp/phpdl81UY"
["error"]=>
int(0)
["size"]=>
int(72761)
}
[1]=>
array(5) {
["name"]=>
string(12) "profiles.png"
["type"]=>
string(9) "image/png"
["tmp_name"]=>
string(14) "/tmp/phptIFS1J"
["error"]=>
int(0)
["size"]=>
int(16178)
}
[2]=>
array(5) {
["name"]=>
string(0) ""
["type"]=>
string(0) ""
["tmp_name"]=>
string(0) ""
["error"]=>
int(4)
["size"]=>
int(0)
}
}
}
I want to remove whole below array from above (when it have empty name):
[2]=>
array(5) {
["name"]=>
string(0) ""
["type"]=>
string(0) ""
["tmp_name"]=>
string(0) ""
["error"]=>
int(4)
["size"]=>
int(0)
}
How this can possible I tried with array_pop, unset and other predefined php functions but not getting the correct result. Please help me out to reach the correct value Thanks in advance