Tuesday, August 16, 2011

PHP Tutorial: How To: Output an Array with Readable Formatting [Quick Tip]

In this video I go over a way that you can output an array in a format which is easily readable. This method takes advantage of the pre tag in HTML. The pre tag preserves the white space, and in turn allows you to output an array on your page in the same format that you see when you view the source (a commonly used way of viewing the array.) This method can be applied in other uses, formatting paragraphs with indentation being one of them. It is useful to give your users the best usability as possible. This tutorial is one in a series of quick tips that are dedicated to help you improve the quality, speed and efficiency of your coding. Please check out the other videos! If you have any questions, comments or concerns feel free to leave a message down bellow in the comments or to send me a message to me via YouTube. I will get back to you as soon as I can!

No comments:

Post a Comment