Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP CRUD Operations with PHP Creating Records Reading Project Data

no error

my workspaces didn't show the error mention in the video, that the for each was expecting an array, I am just curious why it happened. thanks

1 Answer

Darrell Conklin
Darrell Conklin
21,786 Points

I've had a similar issue with the PHP coarses lately. Try adding:

ini_set('display_errors', 1);
error_reporting(E_ALL);

to the top of the index.php file just after the opening PHP tag and see if the error shows up. If so the apache server's settings have error reporting turned off. If you wish to turn error reporting back off for any reason you can always comment it out.