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

Darrell Conklin
seal-mask
.a{fill-rule:evenodd;}techdegree
Darrell Conklin
Python Development Techdegree Student 22,110 Points

PHP Beautifier

So I used simplexml_load_string to convert an xml string into an object. How would I go about printing the object to the screen in a nice clean looking format instead of a giant block of code?

If there isn't one how about a beautifier that would format it for me? I've tried a few I found on google and they all just returned it back to me the same way I gave it to them ... in one extremely long string. Or an editor even.

1 Answer