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!
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

Ernesto Rivas
887 PointsDoesn't work!
For some reason the Mike's 4 Shirts doesn't seem to be working for me anymore.
3 Answers

Ben Russell
3,667 PointsErnesto - You're best bet is to paste your code into codepen, and send us the link to check your code.....after you've checked your code yourself :)

Ernesto Rivas
887 PointsSorry thought I copied the code. When I put <?php include('include/products.php'); ?>
the shirts don't show up.
<?php include('include/products.php'); ?>
<?php $pageTitle = "Mike's Full Catalog of Shirts"; $section = "shirts"; include('include/header.php'); ?>
<div class="section shirts page">
<div class="wrapper">
<h1>Mike’s Full Catalog Of Shirts</h1>
<ul class="products">
<?php foreach($products as $product_id => $product){
echo "<li>";
echo '<a href="shirt.php?id=' . $product_id . '">';
echo '<img src="' . $product["img"] . '" alt="' . $product["name"] . '">';
echo "<p>View Details</p>";
echo "</a>";
echo "</li>";
}
?>
</ul>
</div>
</div>
<?php include('include/footer.php'); ?>

Ernesto Rivas
887 PointsNever mind I figured it out!
James Barnett
39,199 PointsJames Barnett
39,199 PointsBen Russell - Codepen only supports HTML/CSS/JavaScript no PHP. Luckily there's a PHP code playground as well that you can use.
Ben Russell
3,667 PointsBen Russell
3,667 PointsAh - Good to know. Thanks James