Easy stylesheets with basic PHP
November 14th, 2007 Posted in Programming, TricksCreate a file called stylesheet.php and link to it in you’re page. Then play with this code:
<?php
header(‘Content-type: text/css’);
header(‘Content-type: text/css’);
// Colour scheme
$primary = "#44749d";
$secondary = "#c6d4e1";
$tertiary = "#ffffff";
$quaternary = "#ebe7e0";
$quinary = "#bdb8ad";
?>
BODY {
background: <?php echo $tertiary ?>;
color: #000000;
margin: 0px;
}