hie
can someone make me a simple snippet for $duplicate

example i want is like $duplicate(%a,b)

%a = text1 text2 text3
%b = %text3 %text4 %text5
%c is the duplicate values in %a & %b example
%c = %text3
%d is the return of the values from both %a & %b without duplicate values , example %text1 %text2 %text3 %text4 %text5

thx for reading and happy coding