php中字符串中某一个字符的轮换

WBOY
Release: 2016-06-13 11:06:56
Original
773 people have browsed it

php中字符串中某一个字符的替换
例如:$author="|脑瘫|小儿脑瘫的原因|脑瘫先天性因素|"

修改为:$author="脑瘫,小儿脑瘫的原因,脑瘫先天性因素"

具体是去掉首位的|   中间的换成,

大神快点帮我解决下  PHP初学者

在线等!!!!
------解决方案--------------------
$author = str_replace('
------解决方案--------------------
', ',', trim($author, '
------解决方案--------------------
'));

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