From the course: Learning PHP
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Display basic information on an HTML page - PHP Tutorial
From the course: Learning PHP
Solution: Display basic information on an HTML page
(upbeat music) - [Instructor] All right, so with our starting point here, let's look at a solution to this challenge. Now, keep in mind that your solution will probably be different cause I've asked you to write a narrative. But the way that you do certain things will likely be the same. So, let's take a look. So, first of all I have opted to print out all of the HTML with PHP. Another way we could have done it was to end our PHP tags, and then write the HTML, echoing the variables as needed. Like we're doing here. Either one of those solutions would be sufficient. So, we'll comment this one out so you could see both in the exercise files that are available with this lesson. You'll also notice that in the echo statement, I included two line breaks, you can see that I did that after each paragraph. And when we look at the browser version of this you'll see why. We've included the variables using double quotes in…
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
-
-
-
How PHP works2m 29s
-
(Locked)
Printing on the screen3m 53s
-
(Locked)
Using variables6m 40s
-
(Locked)
Single vs. double quotes7m 3s
-
(Locked)
What are arrays and how do they work?3m 56s
-
(Locked)
Defining arrays8m 10s
-
(Locked)
Challenge: Display basic information on an HTML page36s
-
(Locked)
Solution: Display basic information on an HTML page2m 57s
-
-
-
-
-
-
-
-
-
-