I'm trying to use php variables in my .css. I have change my style.css to style.php and I've add the next code in it:
<?php header("Content-type: text/css");
$color[0]='#ff0000';
$color[1]='#00ff00';
$color[2]='#0000ff';
$i=rand(0,2);
?>
Then I'm trying to use this color in a css property. Something like this:
background-color: "<?=$color[$i]?>";
When I try to see what happens... nothing happens. If I see on firefox inspector it seems that my code is not changing from php to html.
Any Ideas?
background-color: "<?=$color[$i]?>";?<?)?