Home > Backend Development > PHP Tutorial > PHP smarty--smarty basics

PHP smarty--smarty basics

巴扎黑
Release: 2016-11-24 09:23:53
Original
1092 people have browsed it

1. The first letter of the first sentence should be capitalized: <{$str1|capitalize}>

2. The second sentence template variable + Li Xiaojun: <{$str2|cat:"李晓君"}>

3 . The third sentence outputs the current date: <{$str3|date_format:"%Y year %m month %d day"}>

4. The fourth sentence. The php program does not process it, it displays the default value: < ;{$str4|default:"No value!"}>

5. The fifth sentence should be indented by 8 blank characters, and use "*" to replace these 8 blank characters: <{$ str5|indent:8:"*"}>

6. The sixth sentence changes all TEACHerLI@163.com to lowercase: <{$str6|lower}>

7. The seventh sentence The eighth sentence is to use variable modifiers in combination: <{$str8|capitalize |cat:"Here is the newly added time:"|date_format:"%Y year %m month %d day"|lower}>

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