You'll have to loop through the list and append each value to the array if 
you want to capture empty list elements.

The following code should work, but I haven't tested it so it might not.

<cfset myAr = ArrayNew(1)>
<cfset myVar = 'Produce|Apples |"green, bagged"|1.23/lb||||3 lb|1|0 g|0 mg|0 
mg|22 g|5 g|16 g|0 g|2%'>
<cfloop index="tempVar" list="#myVar#" delimiters="|">
<cfset result = ArraryAppend(myAr, tempVar)>
</cfloop>

<cfoutput>#arrayLen(myAr)#</cfoutput>

-
Rod Enke
PracticeMatch, Inc.
www.practicematch.com <http://www.practicematch.com>

On 6/29/05, Daniel Kessler <[EMAIL PROTECTED]> wrote:
> 
> <!--- 17 entries --->
> <cfset myvar = 'Produce|Apples |"green, bagged"|1.23/lb||||3 lb|1|0
> g|0 mg|0 mg|22 g|5 g|16 g|0 g|2%'>
> <cfset myAr = listToArray(myVar,"|")>
> <!--- outputs --->
> #arrayLen(myAr)#
> 
> How do I make it an array that includes all the entries? This messes
> up my indexing. I only want it to keep an empty entry or empty
> quotes. I'll be lining up 1 through 17 for manipulation and then
> inserting into a db and it's all by index.
> --
> Daniel Kessler
> 
> Department of Public and Community Health
> University of Maryland
> Suite 2387 Valley Drive
> College Park, MD 20742-2611
> 301-405-2545 Phone
> www.phi.umd.edu <http://www.phi.umd.edu>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210891
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to