In today’s tutorial, I will show you how to use PHP to select among different stylesheets that you have for your site. I will still be using Javascript to choose, but it’s not too important in this tutorial.
more →
I won’t talk about this too much here because this tutorial already exists here.
I just thought I’d bring this way up first before I post the way that I would do it later on.
Basically, the method that the former mentions uses Javascript to create a dynamic page style changer by going through the HTML and finding the <link /> tag.
Initially, there needs to be more than one stylesheet mentioned in <link /> tags by using rel=”alternate” in the non-default stylesheets.Although I don’t like to rely on Javascript too much, this can add for a nice effect since this method doesn’t require the page to be refreshed.
The way that I will show you in a later post uses PHP instead of Javascript to change the stylesheet. My way, unfortunately requires a page refresh.
That’s all for today.





