coldfusion conditional formatting if text string contains "buzzwords"
Posted on 2010-09-15
In one column, "remarks", of my real estate database is a varchar field that contains comments about each property. What I want to do is create a list of "buzzwords" like Granite, Quartz, Pool, etc... and if the remarks text for that property contain these words I want them to be bolded when output on my page.
The code below bolds the complete remarks field, how can I just bold the buzzwords?
<cfif #remarks# CONTAINS "Quartz" OR "Granite"><b>#remarks#</b><cfelse>#remarks#</cfif>