RE: [PHP] complicated questions

From: Date: Mon, 07 Aug 2000 10:43:30 +0000
Subject: RE: [PHP] complicated questions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10441@lists.php.net to get a copy of this message
Mark PHP 4.x only: function check_dup($array) { $size = sizeof($array) $doo = array_flip($array); $array = array_flip($doo); if (sizeof($array) != $size) { return "Duplicates found!"; } else { return "No duplicates!"; } } To use it, you should name your input boxes something like Input_Box[1], Input_Box[2] etc. Actually what goes inside the [ ] is not important (as long as they're all different!). - Jason Wong Digital View Ltd 2201 Nanyang Plaza 57 Hung To Road Kwun Tong HONG KONG Tel: +852-2861-3615 Fax: +852-2520-2987 www.digitalview.com > -----Original Message----- > From: Mark Lo [mailto:markloky@netvigator.com] > Sent: 06 August 2000 17:10 > To: php general > Subject: [PHP] complicated questions > > > HI, > > I have a very complicated questions to ask..escpcially this > is very complicated for myself. > I have ten input text box, and the value of each input text > box cannot be the same as the others or the rest. > How to construct the script to check for the validate of each > input text box having different values in a timely and efficient manner. > > I don't want to have all 45 scripts to check base on 10 input > text box, such as 1!=2, !!=3, 1!=4, 1!=5, 1!=6...and so so...... > And If i have 20 input text box...i will need 190 queries to > check them out....so how to compare thoes ten input text box in > one query . Or Any suggestions is Helpful > > > Thank You, > > > Mark Lo >

« previous php.general (#10441) next »