Can the elseif of if judgment be repeated in thinPHP template?
Synn
Synn 2021-02-01 20:01:51
0
2
1010

In the thinkPHP template, when judging multiple intervals, can I repeat multiple elseifs as shown below? If so, is this the best way to judge multiple intervals?

{if($staff.age<30)}Young {elseif($staff.age<40)/}Middle-aged {elseif($staff.age<50)/} Middle-aged and elderly {elseif($staff.age<60)/}elderly {else/}retired{/if}

Synn
Synn

reply all (1)
灭绝师太

The multi-directional process branch structure can be completed in this way, which is optimal~

  • reply Got it, thank you, Master~
    Synn author 2021-02-02 15:45:07
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!