Home >Backend Development >PHP Tutorial >PHP smarty--smarty basics
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}>