Home  >  Article  >  Backend Development  >  模板IF语句

模板IF语句

WBOY
WBOYOriginal
2016-06-13 10:35:051138browse

求一个模板IF语句


这个是单个字符的IF
如果我是'美美','白白','胖胖','嫩嫩'四个呢?

代码应该怎么写,知道的朋友直接给代码可以吗?谢谢了,小弟不怎么懂PHP

------解决方案--------------------
试一试这样,通常模板引擎也是这么解析的





如果是smarty的也可以这样




$arr是"美美"....

Statement:
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