Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ben Os](https://secure.gravatar.com/avatar/c6bac24248317129b390d60b7c088e40?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ben Os
20,008 PointsI think I did everything Alena showed in this video but I can't filter items by category
In this video we filter our items by categories based on the section variable values associated with each page (books page, videos pages, music page, etc).
I encounter 2 problems:
The categories don't work, moreover, the pages are empty from items.
The music page has an error "unidentified variable - pagetitle"; This is wired as I just tried to put it's H1 similar to the default pagetitle.
Here is my site:
http://port-80-mkqxe69shv.treehouse-app.com/catalog.php?cat=books
Here is a snapshot:
1 Answer
![Matthew Bilz](https://uploads.teamtreehouse.com/production/profile-photos/4736052/micro_IMG_3300.jpg)
Matthew Bilz
15,829 PointsTo address your page title variable, you have a double equals sign on top of you catalog.php when you are assigning the value to the $pagetitle variable, so I'd start with putting a single equals sign for
$pagetitle = "music";
Ben Os
20,008 PointsBen Os
20,008 PointsIndeed putting a single equal-sign vanished the "unidentified variable" error. You might have an insight on why my items won't appear in each category page?
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Ben,
I would recommend that you review the video. Your array_category function is not complete.