[thelist] PHP - Can write to [head] tag?

Andrew Forsberg andrew at thepander.co.nz
Tue Mar 5 16:50:01 CST 2002


Hi Ron

>I seem to be having trouble writing the style tags into the [head] section.

What sort of trouble? Generating style sheets in the head area should work:

<?php
print ("<style type='text/css'>\n<!--\n");
print ("//style stuff");
print ("-->\n</style>\n");
?>

>Is there a better way to be doing this?

I had a client who added .pcss to the list of extensions php parses
so they could include php code in their external css files. Limits
the codes portability I suppose, but it suited them. They used it to
put browser-specific conditionals along with all the styles in the
one css file, rather than have multiple css files for different
browsers and the logic in their header include.

Cheers
Andrew
--



More information about the thelist mailing list