如何才能漂亮的写一个转换字符的程序

WBOY
Release: 2016-06-13 13:42:26
Original
878 people have browsed it

怎么才能漂亮的写一个转换字符的程序
遗传字符
如果含有是“买” 转换成 则转换成“卖”

如果含有是“卖”转换成“买”

如果是“男”转换成“女”
如果是“女”则转换成“男”


用if判断两次感觉好麻烦 有没的更优美的解决方法。

------解决方案--------------------
看清楚了!
是 strtr
不是 strstr

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!