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 Object-Oriented PHP Basics Building a Collection Creating a Collection

Tibor Katai
Tibor Katai
2,102 Points

Alena why not use print_r() function, surround in <pre> html tag?

The var_dump() is not a pretty formating in array,object.

1 Answer

You can surround both with pre tags. As well, if you view source it will be formatted to already to be easier to read.

The difference is the amount of information that each presents to the user.