Thinkphp special labels

Source: Internet
Author: User
Special tag 1. comparison tag eq or equal to neq or notequal not equal to gt greater than egt greater than or equal to lt less than elt less than or equal to heq constant equal to nheq not constant equal...

Special labels

1. compare tags

Equal to eq or equal

Neq or notequal is not equal

Gt>

Egt greater than or equal

Lt is less

Elt less than or equal

Heq constant equals

Nheq is not always equal

2. range tag

In

(In name = 'n' value = '9, 10, 11, 12') among these numbers (else/) is not within the range of these numbers (/in)

(Notin name = 'n' value = '9, 10, 11, 12') among these numbers (else/) is not within the range of these numbers (/in)

Between

(Notbetween name = 'n' value = '1, 10') {$ n} between 1 and 10 (else/) {$ n} is not between 1 and 10 (/)

3. present

Label to determine whether the template variable has been assigned a value. (present name = 'm') m has been assigned a value (else/) m has not been assigned a value (/present)

4. Empty

The empty tag determines whether the template variable is null. (empty name = 'n') n is null and assigned a value (else/) n with a value (/empty)

5. Defined

Determine whether a constant has been defined

6. Define

Define constants in the template

7. Assing

Variable assignment in the template

Use other labels

1. directly use PHP code in the template

(Php) echo "I'm Zhao tongzheng" (/php)

2. it is recommended to change the left and right delimiters.

Change in configuration file

'Tmpl _ L_DELIM '=)' ({', // modify the left delimiter

'Tmpl _ R_DELIM '=)'}) ', // modify the right delimiter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.