Home > Backend Development > PHP Tutorial > 模板IF语句

模板IF语句

WBOY
Release: 2016-06-13 10:35:05
Original
1167 people have browsed it

求一个模板IF语句


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

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

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





如果是smarty的也可以这样




$arr是"美美"....

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