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 PHP Basics (Retired) PHP Datatypes Arrays

Seth Warner
Seth Warner
5,348 Points

I don't mean to "get off track", but I'm cursed with ADHD so I had an idea! what if u took away Print_r under the first?

If you took away print_r under the first array, would it just print the updated list?

2 Answers

Simple. Because you didn't ask to print before the addition to the array, it would simply print out the array with the additions. i.e.
Array ( [0] => blue [1] => green [2] => brown [3] => amber )

Mike Atkinson
Mike Atkinson
6,882 Points

Hey, no need to apologise or anything, that kind of curiosity is great for learning programming.

Thanks Brandon for the Answer, but I would suggest to Seth to open a workspace and try it out. Play with things. Try and guess what it's going to do and then see if your are right.