I want to compare two variables and find the unmatched data and save it to a json in php
$month_name = array(
["months" =>"april"],
["months" =>"may"],
["months" =>"june"],
["months" =>"july"],
["months" =>"august"],
["months" =>"september"],
["months" =>"october"],
["months" =>"november"],
["months" =>"december"],
["months" =>"january"],
["months" =>"february"],
["months" =>"march"]
);
$test=json_encode($month_name);
$due_months=$this->dashmodel->get_due_month_by($fee_type_f);
$test2=json_encode($due_months);
test=[{"months":"april"},{"months":"may"},{"months":"june"},{"months":"july"},{"months":"august"},{"months":"september"},{"months":"october"},{"months":"november"},{"months":"december"},{"months":"january"},{"months":"february"},{"months":"march"}]
test2= [{"months":"april"},{"months":"may"},{"months":"october"}]
I want to get the unmatch month names of the data