9 Replies Latest reply on Feb 8, 2010 2:25 PM by Adam Cameron.

    Evaluate embedded CF variables inside a CF variable

    Tami KB

      I have a variable I would like to display both the contents of AND evaluate the 'value' of the variables inside and am having issues w/ CF8 evaluating both....

      <cfset foo = 'This is a test of the #ppl.getemail()# email account. The password is #ppl.getpassword()#'>

      where ppl.getemail() is 'Jane@foo.com' and ppl.getpassword() is '123abc'

       

      I would like to cfoutput foo and have the results evaluated as ' This is a test of Jane@foo.com email account. The password is 123abc'
      (where the actual value of ppl.getemail() and ppl.getpassword() are evaluated as 'foo'is evaluated)

       

      I have tried cfoutput, cfcontent, evaluate and de, but all print w/o evaluating the the cfc calls. I get literally the variable names in the output instead of their values.

       

      Any suggestions?