How to find multiple key/value pair combination array in unother multiple key/value array in php

Viewed 317

I have a array list (for this example I'm using Googles colors). I'm wanting to be able to search for multiple key/value pairs if found the pair of array then return true otherwise return false.

Input Like below color and lenscolor pair : This value are dynamic comes from dynamic dropdown Array ( [Color] => Tokyo Tortoise,matte Gold & Green [LensColor] => Green )

In this array search above color and lenscolor pair This value are dynamic comes from xml file(converted in array) Array ( [0] => Array ( [Color] => Feathered Carmel,matte Gunmetal & Brown [LensColor] => Brown )

    [1] => Array
        (
            [Color] => Matte Black,matte Black & Smoke
            [LensColor] => Smoke
        )

    [2] => Array
        (
            [Color] => Tokyo Tortoise,matte Gold & Green
            [LensColor] => Green
        )
    [3] => Array
        (
            [Color] => Matte Black,matte Black & Smoke
            [LensColor] => Green
        )
    [4] => Array
        (
            [Color] => Feathered Carmel,matte Gunmetal & Brown
            [LensColor] => Green
        )
    [5] => Array
        (
            [Color] => Feathered Carmel,matte Gunmetal & Brown
            [LensColor] => Smoke
        )

)
2 Answers
Related