Introducing the Practice3:11 with Alena Holligan
Let's practice some PHP to solidify your growing knowledge and make it stick.
[MUSIC] 0:00 Hey everyone Alana here. 0:04 Practice is vital to becoming a proficient developer. 0:06 It solidifies what you learned, causing it to stick in your memory. 0:10 With deliberate practice it becomes quicker and 0:14 easier to solve the challenges you'll face everyday. 0:17 So let's practice some PHP. 0:21 This practice session is intended to follow the PHP basics course. 0:24 If you haven't taken that course already, or 0:28 find this practice session too difficult, then review the PHP basics course first. 0:31 Check the notes associated with this video for additional links and resources. 0:36 Let's review the challenge. 0:41 This challenge includes some helper files for the HTML. 0:43 Besides the index file, there's a CSS file and 0:47 two files we'll be including into our page. 0:51 The instructions file contains the comments for 0:53 each of the six steps required to complete this challenge. 0:57 You will not be adding anything to the instructions file. 1:01 Instead, you'll implement each step for the index file. 1:04 Step one, rename the index file so that the PHP code will be executed. 1:13 Step two, add a code block to the top of the index file, and 1:19 create a variable named $title. 1:23 Set its value equal to "Top 5 Learning Tips". 1:26 Step three, 1:33 replace the two instances of the text title with your variable in such a way 1:34 that in a web browser the values of that variable will be displayed on the page. 1:39 Step four, replace the text include quotes by including 1:46 the HTML file learning quotes dot html from the inc folder. 1:51 Step five, replace the text include tips by including 1:58 the html file learning tips that html from the inc folder. 2:02 Step six, use the built-in date function 2:07 to replace the text date with today's date. 2:11 For this step, 2:16 you can use the documentation to figure out the specific formatting. 2:17 You may choose any format you wish. 2:23 I'll be using the full name of the month, followed by a space and 2:26 the two digit day, followed by a comma, space, then the four digit year. 2:30 Example, December 9th, 1906. 2:37 At any point, you can 2:38 preview the site in a browser by choosing the eye in the top right hand corner. 2:41 Remember, it's okay to make multiple attempts before coming to a solution. 2:48 That struggle to remember what you've learned and 2:53 apply it to the situation is what causes the knowledge to take root. 2:56 If you do get stuck I've included additional resources in the notes 3:00 associated with this video. 3:04 Go ahead and give it a try and I'll show you my solution in the next video. 3:07
You need to sign up for Treehouse in order to download course files.Sign up