How to make an array?

06.05.19 10:34 AM Comment(s) By alokjasmatiya99

Arrays are one of the most important aspects of many programming languages and scripts. It is considered as a group of data items of similar data types. The declaration syntax is approximately similar for all the languages.

Although ColdFusion framework gives you the facility to declare different values by using different variables. But it is difficult to use these all values at once . Even the loop concept is not considered ideal or this task. This is where arrays come into play.

To declare an array in the ColdFusion framework, first an object value is assigned to the array variable.Then an application user is able to assign different values to the array index. To access an array element, it is necessary to call the array variable with its index number.  

There are many different array tags and attributes, which are important for using the array element. Like -

arrayappend -

To add values to the end of an array.

arrayprepend -

To add values to the beginning of an array.

arrayinsertat -

To add values in any of the intermediate numbers.

Hope you have liked this post ! Thanks for reading this post.

reference links - 

Get Started Now
Share -