I need to get values from a multidimensional array using a specific value in PHP.
For example, given this array I would like to extract data based on index [1] equal to 'MUFA-D' then use the other values found in [3],[4] which would be '141' and 'Purity FM Synthetic'
Array
(
[0] => Array
(
[0] => CHI
[1] => MUFA-D
[2] => 1
[3] => 141
[4] => Purity FM Synthetic
[5] => 5
[6] => Lubricants
)
[1] => Array
(
[0] => CHI
[1] => BRD1-IS
[2] => 1
[3] => 146
[4] => Food Grade Silicon
[5] => 3
[6] => Lubricants
)
[2] => Array
(
[0] => CHI
[1] => BRD1-MC
[2] => 1
[3] => 145
[4] => SAE 140 Oil
[5] => 1
[6] => Lubricants
)
[3] => Array
(
[0] => CHI
[1] => JBC-BAK-B
[2] => 1
[3] => 141
[4] => Purity FM Synthetic
[5] => 5
[6] => Lubricants
)
)