By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 650 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

Matching more than one value in a file array

P: n/a
I have 10 records in $_FILES[userfile]. When a person submits a form,
I just want to check that none of the filenames are identicle. does
preg_match_all do this? I guess I'll be going through an array, but i
would also have to eliminate blank fields for it to be effective.

any ideas?

cheerio
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
RelaxoRy wrote:
I have 10 records in $_FILES[userfile]. When a person submits a form, I just want to check that none of the filenames are identicle. does
preg_match_all do this? I guess I'll be going through an array, but i would also have to eliminate blank fields for it to be effective.


Have you looked at the array functions at
<http://www.php.net/manual/en/ref.array.php>, especially
'array_unique()' at
<http://www.php.net/manual/en/function.array-unique.php>?

Ken

Jul 17 '05 #2

P: n/a
"RelaxoRy" <re******@postmaster.co.uk> wrote in message
news:3b**************************@posting.google.c om...
I have 10 records in $_FILES[userfile]. When a person submits a form,
I just want to check that none of the filenames are identicle. does
preg_match_all do this? I guess I'll be going through an array, but i
would also have to eliminate blank fields for it to be effective.

any ideas?

cheerio


No, it doesn't. And it might not be a check that you should be doing anyway,
since identical flenames do not imply identical files. The files might, for
instance, be residing in different folders.
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.