I have a PHP function that outputs quote marks like so when rendered in the html.
onload="this.rel='stylesheet'"
What I want is the following:
onload="this.rel='stylesheet'"
Here is the function causing the first example to happen - does anyone know how I can solve this?
public function get_css($opts, $index, $count)
{
$out = array();
$version = filemtime($_SERVER['DOCUMENT_ROOT'].'/assets/css/app.min.css');
$str = "this.rel='stylesheet'";
$out[] = $this->_single_tag('link', array(
'rel'=>'preload',
'as'=>'style',
'type'=>'text/css',
'href'=>'/assets/css/app.min.'.$version.'.css',
'onload'=>$str,
));
return implode("
\t", $out)."
";
}
Here is the function for _single_tag
protected function _single_tag($tag=false, array $attrs)
{
if ($tag===false) return;
return PerchXMLTag::create($tag, 'single', $attrs);
}