I’m relatively new to PHP/HTML so i’d like to know the best way to go about this scenario.
Say I have a variable $color.
color can either be
$color = “blue”;
or
$color = “red”;
based on users input.
When displaying it in html:
<?php echo($color); ?>
how can I make it change color in html CSS/style based on what the variable is. (I want it to be in blue font if the variable is equal to “blue” and vice versa.)
I know how to change font colors in html and all the basic style/css just like to know how you would go about changing it based on a string in a variable.