Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Last active December 22, 2018 18:56
Show Gist options
  • Select an option

  • Save walterdavis/61986984fc93b3258c8e4192ac3ea8fc to your computer and use it in GitHub Desktop.

Select an option

Save walterdavis/61986984fc93b3258c8e4192ac3ea8fc to your computer and use it in GitHub Desktop.
curly
<link rel=”stylesheet” type=”text/css” href=”Resources/seasonal.php” />
corrected:
<link rel="stylesheet" type="text/css" href="Resources/seasonal.php" />
missing:
<?php
$images = array(1 => 'winter1.jpeg', 2 => 'winter2.jpeg, 3 => 'winter3.jpeg',
4 => 'winter4.jpeg', 5 => 'spring1.jpeg', 6 => 'spring2.jpeg',
7 => 'spring3.jpeg', 8 => 'spring4.jpeg', 9 => 'summer1.jpeg',
10 => 'summer2.jpeg', 11 => 'summer3.jpeg', 12 => 'summer4.jpeg',
13 => 'fall1.jpeg', 14 => 'fall2.jpeg', 15 => 'fall3.jpeg',
16 => 'fall4.jpeg');
header('Content-type: text/css');
?>
#seasonalpicture {
background-image: url(<?php print($images[date('n')); ?>);
background-size: cover;
background-position: center;
}
corrected:
<?php
$images = array(1 => 'winter1.jpeg', 2 => 'winter2.jpeg', 3 => 'winter3.jpeg',
4 => 'winter4.jpeg', 5 => 'spring1.jpeg', 6 => 'spring2.jpeg',
7 => 'spring3.jpeg', 8 => 'spring4.jpeg', 9 => 'summer1.jpeg',
10 => 'summer2.jpeg', 11 => 'summer3.jpeg', 12 => 'summer4.jpeg',
13 => 'fall1.jpeg', 14 => 'fall2.jpeg', 15 => 'fall3.jpeg',
16 => 'fall4.jpeg');
header('Content-type: text/css');
?>
#seasonalpicture {
background-image: url(<?php print($images[date('n')); ?>);
background-size: cover;
background-position: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment