How to remove the two duplicate values

How to remove the two duplicate values

Example I have the variable 1 $help_brother:

$help_brother = '30,45,12,13,14,15';

And the variable 2 Force World:

$force_world = '45,12,15';

The result must be:

Result: '30,13,14';

Any help is welcome. Thanks in advance.

You will need explode, array_diff and implode.

Very obliged to answer, I found the answer.

Care to share your answer for others reading along? :slight_smile: