Php in css

Hello,

Before I google around, I’d like to know if anybody did this before. I want to have my php code below (display time and date) in an external css file or something else so that I don’t have to include it on each of my page. Any tutorial will be greatly appreciated.

Thanks

Code:
<?php

$hour = date(“H”);
$day = date(“D”);
if (($hour >= 0) && ($hour < 12))
{ echo date(“d.m.Y”) ."-" $hour;
echo “<br />”;
echo “Good Morning”;
;}
else if (($hour >= 12) && ($hour < 17))
{ echo “good afternoon”;
} else
{echo “good evening”;}

?>