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 trialIan Rushton
15,789 PointsWorkspaces not corresponding with video in Integrating 'PHP with Databases' Course - Querying Multiple Tables with JOIN
When I opened the new workspaces to work alongside Alena, the code in functions.php did not correspond with that being shown in the video. Here is what was showing for me:
<?php
function get_item_html($id,$item) {
$output = "<li><a href='details.php?id="
. $id . "'><img src='"
. $item["img"] . "' alt='"
. $item["title"] . "' />"
. "<p>View Details</p>"
. "</a></li>";
return $output;
}
function array_category($catalog,$category) {
$output = array();
foreach ($catalog as $id => $item) {
if ($category == null OR strtolower($category) == strtolower($item["category"])) {
$sort = $item["title"];
$sort = ltrim($sort,"The ");
$sort = ltrim($sort,"A ");
$sort = ltrim($sort,"An ");
$output[$id] = $sort;
}
}
asort($output);
return array_keys($output);
}
Alena Holligan
Treehouse TeacherThe workspace should be fixed now. If you delete your workspace (https://teamtreehouse.com/workspaces) for the course and relaunch a new workspace it should be corrected now
Ian Rushton
15,789 PointsThank you Alena and Jason!
7 Answers
Alena Holligan
Treehouse TeacherNot sure what the problem was, but I was able to get this fixed and creating new workspaces correctly now. Let me know if you continue to have issues. Just in case, you can also download the project files.
filipepacheco
Full Stack JavaScript Techdegree Student 21,416 PointsHi Alena Holligan, It's still not working for me. Tried deleting and relaunching it, but it's still different. Don't even have the connection.php.
David Harston
7,261 PointsI'm having the same issue as above. I deleted the old workspace, but when I launch workspaces again, it shows the same code in functions.php as at the top of this page.
filipepacheco
Full Stack JavaScript Techdegree Student 21,416 Points23 days to get a reply for an issue with the system. Not nice.
Ian Rushton
15,789 PointsI imagine the issue didn't flag up straight away because it was resolved initially and I didn't actually follow this up. My apologies all!
Alena Holligan
Treehouse TeacherSorry Filipe, I somehow missed the notification until I saw something from David. Please feel free to email me as well if you're having issues with the php content.
filipepacheco
Full Stack JavaScript Techdegree Student 21,416 PointsAh, ok. I understand. I definitely will. =) Thank you, Alena.
David Harston
7,261 PointsAll working great now. Thank you!
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsTagging Alena Holligan