$str1='<option value="AAA">AAA</option><option value="BBB">BBB</option><option value="CCC">CCC</option>';
$str2='<option value="CCC">CCC</option><option value="DDD">DDD</option>';
I would like the expected result as following. If some part of $str2 which is duplicated with part of $str1, then removing the duplicated part of $str2.
Expected result:
$expectedStr = '<option value="DDD">DDD</option>';
Can anyone help me?