php排除雷同的字符留一个

WBOY
Release: 2016-06-13 11:45:26
Original
819 people have browsed it

php排除相同的字符留一个

$a = "'你好','你好啊','他好','他好啊','我好','我好啊','他好啊','我好'";
Copy after login


怎么$a里以,为分隔,把里面相同的排除掉一个

麻烦知道的大哥直接给完整代码

'你好','你好啊','他好','他好啊','我好','我好啊','他好啊','我好'

就是把绿色和红色部分相同的取其中一个,有时会出现3个,4个,5个相同的但都取一个
'你好','你好啊','他好','他好啊','我好','我好啊','他好啊','我好','他好啊','我好','我好'

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template