Allen's solution uses PHP shorthand.
It does exactly the same, but in a different syntax.
$icolor = ($icolor == "f2efe8" ? "" : "f2efe8")
It works like this:
(this is not real PHP)
$iColor = IF($icolor == "f2efe8") THEN '' ELSE "f2efe8";
And as you can see it is very difficult to understand.