I have two arrays. One with color names and the other with the RGB values.
I am converting a color name to it\'s RGB value using str_replace() (then doi
str_replace()
That's because str_replace() finds yellow first (Because it's before Pale Yellow in the array) and after this it can't find Pale anymore. So use strtr() instead, like this:
yellow
Pale Yellow
Pale
$RGBvalue = strtr($colour, array_combine($RGBint, $ColourName));