How to achieve the following ?
$array1 = array( id => '11', c1 => 'abcd', c2 => '4500', c3 => 'texas' ,c4=>'name' );
$array2 = array( id => '12', c1 => '', c2 => '4500', c3 => 'arizona', c4=>'' );
I want to compare array 1 and array 2 and copy value from array 1 to array 2 when array 2 value is null
. Example from above array i want to copy only c1 & c4 key from array 1 to array 2.
Thanks for the help