Skip to content

PHP code snippet – How to make diffrent pages have diffrent styles?

<link rel="stylesheet" type="text/css" href="main_style_sheet.css" />
if (isset($css) && is_array($css))
  foreach ($css as $path)
    printf('<link rel="stylesheet" type="text/css" href="%s" />', $path);
See also  PHP code snippet - How to collapse array in laravel?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.