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

Alex Bauer
Alex Bauer
9,426 Points

Can someone please help me find my parse error in my code?

It says that there's a parse error on line 4 in recipecollection.php.

I've included a screenshot here: https://w.trhou.se/4zri5wsiyx

2 Answers

Antonio De Rose
Antonio De Rose
20,885 Points

your recipecollection does start with a word new, shouldn't it be starting with class RecipeCollection, instead of new RecipeCollection

Alex Bauer
Alex Bauer
9,426 Points

You're right thank you! I really appreciate your help! :D

Corey Montgomery
Corey Montgomery
18,468 Points

In recipecollection.php you are declaring 'new' instead of 'class'. Once you change that, the error goes away. Didn't fully look at the requirements but it does produce the var_dump. Assuming that is your intention. Hope that helps.

Alex Bauer
Alex Bauer
9,426 Points

Thank you! I looked this over like 10+times and it was the same thing the instructor had in the video. I changed it and it worked like you said, so then I was confused why it worked for the instructor. Turns out I didn't finish the last 5 seconds of the video xD the instructor changed it to class at the last second of the video lol.