Actually, that's incorrect. Count() only works with arrays. And it just so happens that's what it's counting... =]
To try and clarify, $_FILES is an array that has info about all the files uploaded to that particular page. Inside each element of this array is a sub-array with statistical data about each file. So if I upload a file with an input field named 'myFile', than inside of PHP, I'd get this... $_FILES['myFile'] which is an associative array itself (same as a CF struct) $_FILES['myFile']['name'] which is the original name $_FILES['myFile']['type'] which is the mime-type $_FILES['myFile']['size'] which is the size in bytes $_FILES['myFile']['tmp_name'] which is the name of the temporary file. $_FILES['myFile']['error'] this is an error code associated with the upload. You can find out more about it here... http://ca3.php.net/features.file-upload So basically, it looks like this will always return 1. $k = count($file['name']); Cheers, Kevin -----Original Message----- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: November 16, 2005 9:15 PM To: CF-Talk Subject: RE: php translation 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:224496 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

