I need to be able to swap given values if they are present in a multidimensional array.
$cars = array
(
array("Volvo", "Silver", "Silver Metallic"),
array("BMW", "Red", "Sunset Red")
);
For example if I'm given the following values within an object:
$myobject->make = "Volvo";
$myobject->color = "Silver Metallic";
I need to use the array above to return
Silver
Not sure how to plug it all together.
echo $cars[0][$myobject->make]...