document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <cfset arr = listToArray("1,2,3,4,5") />
  2. <cfoutput>
  3.   Displaying array values.<br/>
  4. </cfoutput>
  5. <cfloop index="loopcount" from=1 to=5>
  6.     <cfoutput>
  7.         #arr[loopcount]#<br>
  8.     </cfoutput>
  9. </cfloop>
  10. <cfoutput>
  11.   Done. <br/>
  12. </cfoutput>
  13.  
  14. <cfset indexNumber=1 /> <!--- assume input value = 1 --->
  15. <cfoutput>
  16.   Array index to be edited= #indexNumber#<br/>
  17. </cfoutput>
  18.  
  19. <cfset arrayValue=2 /> <!--- assume input value = 2 --->
  20. <cfoutput>
  21.   New Value= #arrayValue#<br/>
  22. </cfoutput>
  23.  
  24.  
  25. <cfset arr[indexNumber] = arrayValue />
  26. <cfoutput>
  27.   Displaying array values.<br/>
  28. </cfoutput>
  29. <cfloop index="loopcount" from=1 to=5>
  30.     <cfoutput>
  31.         #arr[loopcount]#<br>
  32.     </cfoutput>
  33. </cfloop>
  34. <cfoutput>
  35.   Done. <br/>
  36. </cfoutput>
');