Guten Tag,
ich habe folgende Seite:
<html>
<head>
<title>Insert title here</title>
<style type="text/css"> <?php include ("css.php"); ?></style>
</head>
<body>
<?php
$pic = ArrayMitBildern;
for($i=0;$i<1;$i++){
echo "<a id=\"p".$i."\" href=\"".$pic[$i]."\">Bild $i</a>";
}
?>
</body>
</html>
Die CSS-Datei (css.php) sieht so aus:
div {
border: grey dashed 1px;
}
<?php
for($e=0;$e<count($pic);$e++){
echo "
a#p$e{
width: 200px;
height:150px;
display: block;
background-image: url(".$pic[$e].");
}
a#p$e.hover{
background-position: 0 150px;
}
";
}
?>
Der nicht-Php-Teil des CSS-Files wird zwar interpretiert, nicht aber der Php-Teil. Was mache ich falsch?