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

PHP

Extending the Display using OOP

In the list_item.php file, when I attempt to update the display with the code used in the tutorial, I am left with a blank screen.

I replaced echo '<div class="listing panel panel-default">' . PHP_EOL; with echo '<div class="listing panel '; switch ($listing->getStatus()) { case 'premium': echo 'panel-info'; default: echo 'panel-default'; } echo '">' . PHP_EOL; and updated the listing by adding a description like so: if (is_a($listing, 'ListingPremium') && !empty($listing->getDescription() { echo '<p>' . $listing->getDescription() . '</p>'; }

Any suggestions?