DEV Community

Replace recursively only empty array values

Adrián Vera on September 12, 2018

Hey fellow coders, i need your assistance! (please send help) lets say i got array A and array B: A = [ 'personal_data' => [ A => ['tes...
Collapse
 
rehmatfalcon profile image
Kushal Niroula

From what you describe, shouldn't the resulting array have personal_data as empty string, as the second array would overwrite it?

Collapse
 
medadrian profile image
Adrián Vera • Edited

Yes, you are right, i already commented on the problem