[PHP] returning the index number

2007-06-05 Thread blueboy
I have an array of files to be uploaded 2. 3. I can get the name foreach ($_FILES['userfile']['name'] as $value) { echo $value } but I want the index position, any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] returning the index number

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: > I have an array of files to be uploaded > > > > > 2. > > > > 3. > > > > I can get the name > $i = 0; > foreach ($_FILES['userfile']['name'] as $value) { > > echo $value $i++; > } > > but I want the index position, any idea

Re: [PHP] returning the index number

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 11:43 -0400, Robert Cummings wrote: > On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: > > I have an array of files to be uploaded > > > > > > > > > > 2. > > > > > > > > 3. > > > > > > > > I can get the name > > > > $i = 0; > > foreach ($_FILES['userfile']['nam

[PHP] returning the index number part2

2007-06-05 Thread blueboy
if I have an array of 3 images 1. 2. 3. http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] returning the index number

2007-06-05 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-06-05 at 11:43 -0400, Robert Cummings wrote: On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: I have an array of files to be uploaded 2. 3. I can get the name $i = 0; foreach ($_FILES['userfile']['name'] as $value) { echo $value $i++;

Re: [PHP] returning the index number

2007-06-05 Thread Jochem Maas
Robert Cummings wrote: > On Tue, 2007-06-05 at 11:43 -0400, Robert Cummings wrote: >> On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: >>> I have an array of files to be uploaded ... >> $i = 0; >>> foreach ($_FILES['userfile']['name'] as $value) { >>> >>> echo $value >> $i++; >>> } >

Re: [PHP] returning the index number part2

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 17:16 +0100, blueboy wrote: > if I have an array of 3 images > > > > 1. > > > > 2. > > > > 3. > > > > > How do I access the filename? Like this? > > echo $fileName1 = $_FILES['userfile']['name'][0]; > echo $fileName2 = $_FILES['userfile']['name'][1]; > echo

Re: [PHP] returning the index number part2

2007-06-05 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-06-05 at 17:16 +0100, blueboy wrote: if I have an array of 3 images 1. 2. 3. No, like this: echo $fileName1 = $_FILES['userfile'][1]['name']; echo $fileName2 = $_FILES['userfile'][2]['name']; echo $fileName3 = $_FILES['userfile']

Re: [PHP] returning the index number part2

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 09:33 -0700, Jim Lucas wrote: > Robert Cummings wrote: > > On Tue, 2007-06-05 at 17:16 +0100, blueboy wrote: > >> if I have an array of 3 images > >> > >> > >> > >> 1. > >> > >> > >> > >> 2. > >> > >> > >> > >> 3. > >> > >> > >> > >> >> > >> How do I access the

Re: [PHP] returning the index number part2

2007-06-05 Thread Richard Lynch
This will tell you how: On Tue, June 5, 2007 11:16 am, blueboy wrote: > > if I have an array of 3 images > > > > 1. > > > > 2. > > > > 3. > > > > > How do I access the filename? Like this? > > echo $fileName1 = $_FILES['userfile']['name'][0]; > echo $fileName2 = $_FILES['userfile'