if you are reading my post its probably because you want to learn how you can make a css file from a php file. lets say you want to make your css file dynamic so you can change the style sheet according to whatever you want, or even you want to get the values from a database.. well, its possible, i will show you how you can convert a php file into a css style sheet file. the only need you need to do is have a css file and save it php.

for example, lets say i have a style sheet file called style.css and i want to get the value from a php file. well, just open the style.css file and save it as style.php, BUT, just make sure you put this code at the very top of the file:

<?php header("Content-type: text/css"); ?>


thats, it, this will make css file from php. i hope i showed you how to make css file from php, this way you can make php file into css files. isnt that great. with this tutorial, i showed you how to save php file into css. well, if you have any questions about changin a php file into css or css into php, here you go.

you can even take it a step further, buy using .htaccess file