Home > Backend Development > PHP Tutorial > 排名不理想,实在没办法,再搞伪原创,哪位高手有写好的函数分享下?

排名不理想,实在没办法,再搞伪原创,哪位高手有写好的函数分享下?

WBOY
Release: 2016-06-13 12:06:17
Original
759 people have browsed it

排名不理想,实在没办法,再搞伪原创,谁有写好的函数分享下????
排名不理想,实在没办法,再搞伪原创,谁有写好的函数分享下????

同义词表.txt
国内-中国
...........




实现, 发现国内换成中国, 发现中国换成国内....


如:           中国国内             
结果为:      国内中国





直接替换会变成     中国中国     或    国内国内    , 达不到效果
.
------解决方案--------------------

$d = array(<br />  '国内' => '中国',<br />  '中国' => '国内',<br />);<br />echo strtr('中国国内', $d);
Copy after login
国内中国

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