I'm looking to dynamically generate some inline CSS and was wondering if it was possible via PHP.
Basically, I'm passing multiple variables via query string and am doing some arithmetic with the values to create values for CSS. Here's what my page looks like:
<?php
$var1 = "var1";
$var2 = "var2";
$divided_amount = $var1/$var1;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Derp</title>
</head>
<div style="height: <?php echo $divided_amount ?>px;">
Dynamic height content here
</div>
</body>
</html>
This is not working out for me and I'm really trying to avoid going with an external stylesheet if possible.
Any help/insight is very much appreciated!