Define Colours?<

admin

Administrator
Staff member
Hi all,

Is it possible to define a colour with PHP? ... My webpage will have three different colours that I will use often through out the page, so I want to have something like,

define("COLOUR_1", '000000');
define("COLOUR_2", '00FF66');
define("COLOUR_3", '009933');


then in my html have something like this,

<font color="#COLOUR_1"><h2>Title something or other,</h2></font>

But this doesn't work,

Please give me some info,
Thanks,you are half right.


define("COLOUR_1", '#000000');
define("COLOUR_2", '#00FF66');
define("COLOUR_3", '#009933');


<span styl="color:<?php echo COLOUR_1 ?>"><h2>Title something or other,</h2></span>

you have to use it in php tags as html has no idea what you are doing.
 
Back
Top