All credit for the answer goes to @KIKO Software and @Phil .
To answer everyones question first: The error is that there is no style added to the class, so the div doesn't revieve a cc style class. My bad that I didn't expres this specificly.
The answer, by @KIKO Software and @Phil, is the quotes and the php tag.
I did not add the short_open_tag, so <?
didn't work, it should have been <?php
And I quotes, I added the quotes because the class should be between quotes ""
.
And to skip a quote during the echo I used the ".
But echo itself was sufficient, and the extra quotes just got in the way.
$style = "input_container";
~
<div class=<?php echo $style; ?>>
And special thank you @Jason Lommelen for the htmlspecialchars()
tip! I can definatly use that at some places.