PHP and CSS

TheOmegaCode

Platinum Member
Aug 7, 2001
2,954
1
0
Is there anyway to print a style sheet? I know I could just put
<link rel="stylesheet" href="scripts/stylesheet.css"> in my head, but I really don't want to do that. I want to put the entire page in PHP, I tried this...
{ print("<LINK REL="stylesheet" type="text/css" href="/scripts/stylesheet.css">;"); }
but it didn't work :(. I really don't know what to do for this... any help would be greatly appreciated.
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0
Either do:

{ print("<LINK REL=\"stylesheet\" type=\"text/css\" href=\"/scripts/stylesheet.css\">;"); }

or

{ print("<LINK REL='stylesheet' type='text/css' href='/scripts/stylesheet.css'>;"); }

If you use double quotes everywhere, how will PHP know where the print statement ends? Hmm?

So either escape the double quotes in the string with \", or use single quotes (as those are equal to double quotes in HTML).