In the TP template language. Both if and EQ can be used for variable comparison. Summarize the following points:
1. Comparison of two variables: <if
Condition = "$ item. group_id EQ $ one. group_id"> <EQ
Name = "item. group_id" value = "$ one. group_id">
If the former fails to be judged, and <NEQ> (or <EQ>) of the latter is OK. Note: $ variable is not required for name, and $ variable is required for value.
2. When the value is null:
<If condition = "name NEQ 'null'"> just a test </If>
<NEQ name = "name" velue = ""> just a test </NEQ>
If the former fails to be judged, the latter's <NEQ> (or <EQ>) can be used to identify null ""
3. When the multi-dimensional array has a subscript of 0: <if
Condition = "name.0 NEQ 'test'"> just
A test </If> <EQ
Name = "name.0" velue = "test"> just a test </EQ> the former cannot be compiled by using if, and the latter EQ can be used.