Published on : August 18, 2020
Title : if.arr
Purpose : The Condition to check given variable is array or not.
Syntax : [if.arr array_name]
//** Do something if given variable name is an array **//
[/if.arr]
Input Parameters :
array_name : The variable name which we want to check that given variable name is an array?
Return Value : It return boolean value (true/false)
Example 1 :
Code : [template.set_array customer_details
lapp_id=71
customer_id=7
level_id=1 /]
[template.set_array/]
[if.arr template.customer_details]
Given variable is an array.
[/if.arr]
Output : Given variable is an array.
Description : In the example, define variable customer_details is an array format, then condition will get satisfied hence logic inside will get executed.
Example 2 :
Code : [template.value_1 = “200”/]
[if.arr template.value_1]
Given variable is an array.
[/if.arr]
Output :
Description : In the example, define variable value 1 is not an array format, then the condition will not get satisfied hence logic inside will not get executed.