Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Setting Up the Project 3:31
- Using PHP Code on Our Site 3:09
- A Simple PHP Example 1 objective
- Including the Header 5:32
- Including the Footer and Adding Additional Pages 3:19
- Basic PHP and Including Files 5 questions
- Using Variables for the Title Tag 3:24
- Working with _GET Variables 5:10
- Variables and Conditionals 6 questions
- Adding Active States to the Navigation 4:29
- Variables and Conditionals 3 objectives

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
You often need the same HTML on multiple web pages: such as headers, footers and navigation. With PHP, we can put all that common code in one place. This will make our site easier to maintain by giving us one place to update shared elements, like copyright date, instead of needing to update each page individually. In this video we'll look at how to utilize common code files with PHP’s include command.
Update to html
index.php unordered list for our random items should have a class of "items".
<ul class="items">
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Jesse Parker
53 Points0 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up