[COLOR=666666]<!--- Set up Variables --->[/color] <cfscript>
id ="10,2,356,65";
count = 81; </cfscript>
=== START CODE EXAMPLE === <CFSET id_list = ListAppend(id, count)> [COLOR=666666]<!--- Change the delimiters from "," to "+" --->[/color] <CFSET id_list = ListChangeDelims(variables.id_list, "+")> [COLOR=666666]<!--- Total the items in the list --->[/color] <CFSET id_total = Evaluate(variables.id_list)>
<cfoutput>
[COLOR=008080]<TD align = "center">[/color]#variables.id_total#[COLOR=008080]</TD>[/color] </cfoutput> === END CODE EXAMPLE ===
or you could do it all in one line:
=== START CODE EXAMPLE === <cfoutput>
[COLOR=008080]<TD align = "center">[/color]#Evaluate(ListChangeDelims(ListAppend(id, count), "+"))#[COLOR=008080]</TD>[/color] </cfoutput> === END CODE EXAMPLE === - tleish
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.