Result of Variable needs Formatting in ColdFusion -
using coldfusion, if result of variable not correctly formatted when rendered, how change it? example, have variable #number#
, displayed value ,3642,
want displayed 3642
instead.
how can achieve formatting?
you can replace non-numeric characters regular expression.
<!--- original variable ---> <cfset input = ",3642," /> <!--- solution ---> <cfoutput>#rereplacenocase(input,'[^0-9]','','all')#</cfoutput>
Comments
Post a Comment