El vie, 06-05-2011 a las 09:41 +0200, Laurent Opprecht escribió:
> Quick question, why
> 
>          $header[] = '<style type="text/css" media="' . $media . '">';
>          $header[] = '/*<![CDATA[*/';
>          $header[] = '@import "' . $file . '";';
>          $header[] = '/*]]>*/';
>          $header[] = '</style>';
> 
> instead of
> 
>          $header = '<link rel="stylesheet" type="text/css" media="' . 
> $media . '" href="'.$file.'" />';


The CDATA is one of those trick to have the @import validate in an XML
schema, I think.
This being said, it would probably be more efficient with something
like:

$header = <<<EOT
<style type="text/css" media="$media">
/*<![CDATA[*/
@import "$file";
/*]]>*/
</style>
EOT;


_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

Reply via email to