I have an array variable $colorArray = array('red','white','blue');
Assume $color = "red"; , how do I match the value of $ color with $ colorArray and then find the corresponding key value "red"? After I find the key value of "red", then I will need to save the key value in another variable for other purposes.
source share