Get Specific Data From Array, Based On Another Value
- by A Smith
I have an array that outputs these values:
Array (
[0] => stdClass Object (
[ID] => 6585
[COLOR] => red
[Name] => steve
)
[1] => stdClass Object (
[ID] => 5476
[COLOR] => blue
[Name] => sol
)
[2] => stdClass Object (
[ID] => 7564
[COLOR] => yellow
[Name] => jake
)
[3] => stdClass Object (
[ID] => 3465
[COLOR] => green
[Name] => helen
)
)
Now, I will know the ID of the person, and I need the get the COLOR value for that specific value set. How is this best achieved please?