Leave a $ a & nbsp; in php to exclude the same character. Hello, hello, he is good, he is good, I am good, I am good, he is good, I am good; how can I separate "," in "$ a" and remove the same ones from it? a big brother who is troublesome to know can directly give the complete code to you. hello, he is good, I am good, hi, he is good. I just want to take one of the green and red parts, and sometimes 3 php will exclude the same character and leave one
$ A = "'Hello', 'hello ', 'Hi me '";
In $ a, how does one exclude the same
Easy to understand, Big Brother, directly give the complete code
'Hi, 'hi,', 'Hi'
It is to take one of the green and red parts. sometimes three, four, and five are the same, but all of them are the same.
'Hello', 'Hello, ', 'hello ', 'Hi! ', 'Hi!', 'Hi'
Share: More
------ Solution --------------------
$ B = join (',', array_unique (explode (",", $ )));