The results in $data variable. I want to remove null values at output.
The following code:
$data = json_decode(json_encode($data),true);
I am copying $data
to $data1
later to merge the two variables using below code:
$data1 = $data;
$unique= array_merge($data1,$data);
$final =array_values(array_map("unserialize",array_unique(array_map("serialize", $unique))));