I have a multidimensional array and I\'m trying to find out how to simply \"echo\" the elements of the array. The depth of the array is not known, so it could be deeply nest
<pre>
<?php print_r ($array); ?>
</pre>
If you're outputting the data for debugging and development purposes, Krumo is great for producing easily readable output. Check out the example output.
Recursion would be your answer typically, but an alternative would be to use references. See http://www.ideashower.com/our_solutions/create-a-parent-child-array-structure-in-one-pass/