I have the following function which I'm for enqueuing styles in PHP pretty similar to the WordPress function.
public function printHTML() {
foreach($this->styles as $style) {
$style = sprintf('<link href="%s" rel="stylesheet" type="text/css" />\n', $style);
$this->print_html .= $style;
}
return $this->print_html;
}
And when calling this inside my index.php page, I do the following :
echo nl2br($styles->printHTML());
But it appears to just throw the whole print_html into 1 line which looks ugly within the source, any idea as to what I'm doing wrong here?