I have a php page with html and php in it. I have the following code:
for ($x = 0; $x <= 100; $x++) {
$result = convertTemp($x);
$tempdesc = getTempName($x);
$textcolor = "blue";
echo ($x . " degrees F is equal to " . round($result, 1) . " C, which is " . '<span id="<?php $textcolor ?>" >' . $tempdesc . '</span>' ."<br/>\n");
}
I would like to have the variable tempdesc echo in different colors based on the $textcolor variable above. For now I have it set to "blue" since I have an id set to blue in my css so they should match up and the word should be echoed in blue but the text is not changing color.