From the course: PHP for Web Designers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Displaying a seasonal feature - PHP Tutorial
From the course: PHP for Web Designers
Challenge: Displaying a seasonal feature
It's time for another challenge. I'd like you to use the techniques we've explored in this chapter to change the main feature image, and its tagline, at the top of the Hansel and Petal homepage according to the season. It's this image here, of white roses, and the tagline is: beautiful arrangements for any occasion. To see what's involved, let's take a look at the code in index.php. The tagline is on line 41, beautiful arrangements for any occasion, and the image is on line 43, its filename begins with 980_white_rose. Now, if you look in the Images folder, you'll see there are three images, all named feature_, followed by the name of a season. So, we've got feature_autumn, feature_spring, and feature_summer. So, the one that's missing is feature_winter, and so you need to find 980_white_rose. It's actually just up here on my screen. And rename that to feature_winter.jpg. All the images are the same size, so you don't need to worry about that. And if we go back to the code we'll see…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Storing multiple values in a variable as an array4m 28s
-
(Locked)
Inspecting an array's elements4m 13s
-
(Locked)
Challenge: Inserting the appropriate alt text1m 27s
-
(Locked)
Solution: Inserting the appropriate alt text5m 26s
-
(Locked)
Displaying an array as a comma-separated list3m 13s
-
(Locked)
Looping through an array's values7m 17s
-
(Locked)
Labeling array elements7m 21s
-
(Locked)
Looping through an array's labels and values5m 29s
-
Finding if a value exists in an array3m 51s
-
(Locked)
Challenge: Displaying a seasonal feature3m 6s
-
(Locked)
Solution: Displaying a seasonal feature8m 30s
-
(Locked)
-
-
-
-