Tag Archives: nl to br

ColdFusion – replace nl to br

Just a quickie if you need to replace NL (New Line or Carriage Return) in CFMX; <cfset text = replace(text,’#Chr(10)##Chr(13)#’,'<br>’,”All”)> You could also wrap it up in a CFC or a function if it’s going to be widely used.

Posted in All The Rest | Tagged , , | Leave a comment