Re: complicated questions
| From: | Robin Vickery | Date: | Mon, 07 Aug 2000 09:26:52 +0000 |
| Subject: | Re: complicated questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10434@lists.php.net to get a copy of this message | ||
markloky@netvigator.com ("Mark Lo") writes:
> 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.
function duplicated( $inputs )
{
while ($head = array_pop($inputs))
{
if (in_array($head,$inputs)) { return 1; }
}
return 0;
}
if( duplicated( array($input1, $input2, $input3, $input4) ) )
{
print "duplicated input\n";
}
--
Robin Vickery...............................................
Planet-Three, 3A West Point, Warple Way, London, W3 0RG, UK
Email: robin@planet-three.net Phone: +44 (0)794 670 6395