Skip to content
Advertisement

Display a php variable’s color inside , depending on the value

I want to scan the variable value $answer, and depending if it’s bigger than 6, to be displayed as green, otherwise, as red.

JavaScript

thank you

Advertisement

Answer

If you mean color green or red, here you go…

JavaScript

Preview: https://3v4l.org/0ejhC

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement