Theres 2 methods for doing it.

<!--- Method #1 --->
<cfloop index="count" from="1" to="6" step="1">
#count#
</cfloop>

<!--- Method #2 --->
<cfset x="1">
<cfloop index="count" from="1" to="6" step="1">
#x#
<cfset x=x+1>
</cfloop>


Now just add a condition in there. It makes it easy since you know that you 
only want 6 numbers. You can set up the if/else anyway you like. take a look 
below.

<cfif #count# IS "1">
<cfelseif #count# IS "3">
<cfelseif #count# IS "5">
</cfif>

Sincerely,
Mike


>From: "Jason Larson" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: Finding an Odd Number
>Date: Mon, 20 Nov 2000 08:57:34 -0700
>
>
>Can someone help me out?
>
>I have a cfloop that loops 6 times, I want to be able to be able to output
>what loop number the current loop is on, and tell if the number is even or
>odd.
>
>Any help would be greatly appreciated
>
>Thanks
>Jason Larson
>[EMAIL PROTECTED]
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Structure your ColdFusion code with Fusebox. Get the official book at 
>http://www.fusionauthority.com/bkinfo.cfm
>
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to