Title: How can I display content of array in PHP? Post by: atari on October 22, 2008, 05:36:44 pm I have an array whatever() which is a multidimensional array containing many many things. I want to display its content for debugging purpose. Is there some easy way to display array content?
Title: Re: How can I display content of PHP array ? Post by: mod on October 22, 2008, 05:42:18 pm There is one function running around the Internet which someone very smart wrote. I do not know who wrote it, but he was a genius. This function is awesome.
Use the following function to display the content of any multidimensional array: Code: function LIST_CONTENTS($arrayname,$tab=" ",$indent=0) This function is very useful when displaying for example the content of your $GLOBALS which can have many dimensions. Use it like Code: echo LIST_CONTENTS($whateverarrayname); Enjoy! Title: Re: How can I display content of array in PHP? Post by: bugibar on October 30, 2008, 08:46:41 pm This is awesome function, I love it!!
|