Here's a cheap little function to mimic the print_r() function from PHP in Actionscript. It's designed to work on most any array and will handle nested arrays through recursion.
//
// recursive function to print out the contents of an array similar to the PHP print_r() funciton
//
function print_a( obj, indent ) {
if (indent == null) indent = "";
var out = "";
for ( item in obj ) {
if (typeof( obj[item] ) == "object" )
out += indent+"[" + item + "] => Object\n";
else
out += indent+"[" + item + "] => " + obj[item]+"\n";
out += print_a( obj[item], indent+" " );
}
return out;
}
// example call
trace( print_a( example_array ) );