Now I'm a bit more confused.
As far as I know, all that information should be in my .css file. Maybe I don't understand how it works.
I'm not familiar with XHTML, just the current version of HTML (four, I assume).
What I'm trying to achieve is for the header to load the .css file into the page.
I'd like to be able to use the 'include' function so I don't have to insert that code into all of my headers.
Thanks for your help.
(and that is what's there right now, as far as the files go)
Loading a random Cascading Styles Sheet
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
array_rand() returns the index of the element it selected, not the element itself. Next, remove the last / from your echo of the <link> tag. And finally, add a <!DOCTYPE> like
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">Thanks.
Ah, thanks. Would that go in the header? Before it?
hmm.
would this work?
hmm.
would this work?
Code: Select all
$cssFiles = array('fileone.css','filetwo.css','filethree.css');
$randomCssFile = $cssFiles[(array_rand($cssFiles))];
echo '<link href="' . $randomCssFile . '" rel="stylesheet" type="text/css" />';-
AshrakTheWhite
- Forum Commoner
- Posts: 69
- Joined: Thu Feb 02, 2006 6:47 am
Re: Thanks.
it returns the key..
Code: Select all
array
(
[key] => value
[key2] => value2
)