thinkphp Common Label Summary

Source: Internet
Author: User

Ternary Operation label

{$v [' member_id '] = = 1? Normal: Not normal}

Volist Label

<volist name= "Data" id= "V" >  name {$v [' username ']} index {$key}</volist>

Output function

1. {$v [' name ']|mb_substr=0,1, ' utf8 '} or {$v [' name ']|mb_substr=###,0,1, ' UTF8 '}2. {: Mb_substr ($v [' Name '],0,2, ' UTF8 ')}

Output Configuration tab
corresponding to C (' Configuration name ');

{$Think. config. Configuration name}

If label

<if condition= "$v [' member_id '] eq 0" >    0 <elseif condition= "$v [' member_id '] eq 1"/>    one <elseif condition= "$v [' member_id '] eq 2"/>    two <elseif condition= "$v [' member_id '] eq 3"/>    three </if>

Switch label

<switch name= "v[' member_id"] ">    <case value=" 0 "> 0 </case>    <case value=" 1 "> One </ case>    <case value= "2" > Two </case>    <case value= "3" > Three </case></switch>

Isset label

<notpresent name= "Think.get.name" >    {$_get[' name '}    <else/> has    not been assigned a value </present>

Ditto

<present name= "_get[' name ']" >    {$_get[' name '}    <else/> has    not been assigned a value </present>

Empty label

<empty name= "Think.get.name" >    name is null    <else/>    name is not empty </empty>

Assign label

<assign name= "var" value= "$var"/> such as <assign name= "var" value= "$Think. get.name"/> resolves to $var = $_get[' name ']

For label

<for start= "1" end= "ten" >    {$i} content <br/></for>

PHP tags

<php>    if (3>5)        echo ' content one ';    Else        

Compare labels

eq    equals neq   not equal to GT    greater than EGT   greater than equals LT    less than elt   less than equal to Heq   constant equals Nheq  not constant equals

thinkphp Common Label Summary

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.