I have a css file named test.css
and I want to use into it of $var
.$var
is at test.php
. test.css
is attached in test.php
. My structure is something like this:
//test.php
<html>
<head>
<?php $var = 'anything';?>
<link href="test.css" rel="stylesheet" type="text/css" />
</head>
<body></body>
</html>
and this is test.css:
// test.css
.<?php echo $var> { // css property }
Currently test.css
does not work. In fact, I want to knoe how can I use of a php variable as a class name into a css file ?