Home > CMS Tutorial > PHPCMS > How to write judgment in phpcms v9 template

How to write judgment in phpcms v9 template

angryTom
Release: 2020-02-15 15:25:51
Original
2675 people have browsed it

How to write judgment in phpcms v9 template

How to write judgment in phpcms v9 template

The if statement is used to judge in phpcms v9 template. The specific usage examples are as follows:

{if $catid==10}
    1
{elseif $catid==11}
    2
{else}
    3
{/if}
Copy after login

If it is in the loop body {loop $data $r}, use:

{if $r[catid]==10}
    1
{elseif $r[catid]==11}
    2
{else}
    3
{/if}
Copy after login

Related recommendations: phpcms tutorial

The above is the detailed content of How to write judgment in phpcms v9 template. For more information, please follow other related articles on the PHP Chinese website!

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