Published on : August 06, 2020

In this section we will learn all array function :

Create Array

Title:Set Array
Purpose : To Set the array
Syntax :[template.set_array info /]
Input Parameter : Key and value pair
Return value : It does not return the value
Example :
[template.set_array info] [lapp_id]201271[/lapp_id] [customer_id]7[/customer_id] [customer_name]Govind Garge[/customer_name] [/template.set_array] [template.info.dump /]

You can also define array using following syntax

[template.set_array info lapp_id=201271 customer_id=7 customer_name=’Govind Garge’ /]
Output : It gives the key and value of the array
Description: In this, we can create the array

Add new element in array

Title:Add new element
Purpose : To add new element in array
Syntax :[template.set array.new=”value”/]
[template.set array.new =”value”/]
Input Parameter :Element with value
Return value :
Example :[template.set projects.new=”project1″/]
[template.set projects.new =”project2″/]
Output :Array
Description: We can add new element in array