Integrating Database Results4:22 with Alena Holligan
We’ll take the associative array created from the results of our database query and use it to populate our library. We’ll talk about how separation of concerns allows us to swap out the data our site is using, without having to change much code.
Another Way to Prove Database Usage
If you would like another way to test that your content is actually being pulled from the database, comment out the
$catalog = $results line.
$catalog = $results->fetchAll(PDO::FETCH_ASSOC);
You need to sign up for Treehouse in order to download course files.Sign up