Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a Basic PHP Website!
You have completed Build a Basic PHP Website!
Preview
In this video we will create the initial array to store our catalog and review the basics for looping through an array.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
we're going to use an array to store all
the information about our media items.
0:00
We'll have one array for
the whole catalog.
0:00
The array will have multiple elements,
one element for each item.
0:03
Then on the main catalog page,
0:07
we'll be able to loop through all
the items using PHP's foreach command.
0:09
We still have more to cover about arrays
before we can build the page entirely, but
0:14
let's open catalog.php and
get a basic array in place.
0:18
At the very top of catalog.php,
let's add some PHP code to create an array
0:23
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