Skip to main content
September 17, 2008
Question

Replace

  • September 17, 2008
  • 1 reply
  • 272 views
When trying to do the following replace:

<cfset temp = assignedDutyList .jobDutyStandards>
<cfset standards= Replace(temp,"''","&#39;","ALL")>

I am getting:

When using named parameters to a function, every parameter must have a name.

Why doesn't this work?
    This topic has been closed for replies.

    1 reply

    Inspiring
    September 19, 2008
    In your "&#39", CF will think your "#39" is trying to output a variable named 39. Variables should start with letters(not numbers) that's why it throws the error you mentioned. Of course, in your case you don't want CF to read it as a variable. To avoid that, escape your character "#" so it will become <cfset standards= Replace(temp,"''","&##39;","ALL")>