severndigital Posted January 12, 2016 Share Posted January 12, 2016 I have a multi-dimensional array that might look like this. Array ( [0] => Array ( [type] => feet [color] => red ) [2] => Array ( [type] => feet [color] => blue ) [3] => Array ( [type] => head [color] => blue ) [4] => Array ( [type] => body [color] => blue ) ) I say might because it's being handed different information each time, but the premise is still the same. I need to check for a color match but only on specific type combinations (head,body.feet). So basically I need to check if the array includes specific type combinations first, and then check them for color matches. so an array that had the above items would return TRUE for a match of Blue I'm having a tough time with this one. Any help would be great. Thanks! Quote Link to comment Share on other sites More sharing options...
Barand Posted January 12, 2016 Share Posted January 12, 2016 Does that return TRUE for blue because there is more than blue, or because you have head,body,feet all blue? Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted January 13, 2016 Share Posted January 13, 2016 Why are the contents of the array so generic and variable? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.