HOW TO ADD TO AND DISPLAY VALUES OF ARRAY?

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
 1139  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    How to add to and display values of array?

    For Example
    <cfset fuitname[1][1] = “apple”>
    <cfset fuitname[1][2] = “banana”>
    <cfset fuitname[2][1] = “mango”>
    <cfset fuitname[2][2] = “grapes”>

    Display the value:
    <cfoutput>
    The first element of fruitname is #fruitname[1][1]# and second is #fruitname[1][2]#
    </cfoutput>

    output:
    The first element of fruitname is apple and second is banana.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!