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 trialChris Martinez
11,715 Pointsgrouping php segments together
(i can't remember what the analog for "statement" and "rule" is for php) is it good practice to separate groups of php code by functionality? ie, when writing up a complete model php doc? i ask because it seems other bits of php run if the error isn't grouped with them, but one error in a continuous stream of code results in a white page. and what is the best way to troubleshoot with php? i am going at apainfully slow pace because i am spending way too much time finding my little mistakes. any advice or consolation would be helpful.
1 Answer
shezazr
8,275 Pointsyes you should split functionality into different functions or use classes to follow DRY principles.