View Single Post
Old 11-22-2008, 03:38 PM  
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
Quote:
Originally Posted by Varius View Post
This should have you on your way

Code:
$array = array(array(100,200,400), array(100), array(200));

foreach ($array as $array2) {
        if ($array2[0]==100 && count($array2)==1) {
                $arrMatches[] = $array2;
        }
}

print_r($arrMatches);
I made an array there out of the arrays that ONLY contained the value 100, but you could just echo out the keys instead or whatever ya like.
not sure if he will run into the problem, but if the array has 100 twice it fails.
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote