The only thing I can guess is that:

count($file['name'])

Means that you have multiple form fields with the same field name.  When
a form is submitted, all same-name form fields are sent as a single
comma-separated value.

Perhaps the count() is counting the number of elements in a
comma-separated list.  In CF comma-separated values are called "lists".

Or, the other alternative is the PHP automatically "converts" the
same-name form fields into an array or a collection that can be counted
with the count() function.

The CF equivalent would be listLen(form.name).

Of course, I could be totally wrong.  ;^)

M!ke

-----Original Message-----
From: Mik Muller [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 8:50 PM
To: CF-Talk
Subject: php translation

Hi,

Looking for a translation from PHP to CF regarding multiple-file upload
handler. Sorry to appear so thick.


This one I can pretty much figure out...

         $file = $_FILES['userfile'];

         <cfset file = form.userfile>


This is a little mystifying.

         $k = count($file['name']);

As far as I know structures can't have multiple instances of the same 
key, and form variables don't have sub structures.

Any help?

Mik

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:224462
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