Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFIF Contains question

Guest
Sep 12, 2008 Sep 12, 2008
How do I get the code below to work?
5.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2008 Sep 12, 2008
PopcornCoder wrote:
> How do I get the code below to work?
>
> <cfset disco = "abis">
> <cfif #disco# CONTAINS "a">Yes<cfelseif>No</cfif>
> <cfif #disco# CONTAINS "l">Yes<cfelseif>No</cfif>

<cfif find(disco,'a')>YES<cfelse>NO</cfif>
OR (depending of if you care about case or not)
<cfif findNoCase(disco,'1')>YES<cfelse>NO</cfif>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2008 Sep 12, 2008
LATEST
1. get rid of the octothorps in your cfif tag.
2. depending on what you are trying to accomplish, either replace the cfelseif tags with cfelse tags, or, put a condition inside those tags.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources