We Recommend

The Art of Prolog, Second Edition: Advanced Programming Techniques The Art of Prolog, Second Edition: Advanced Programming Techniques
This new edition of The Art of Prolog contains a number of important changes. Most background sections at the end of each chapter have been updated to take account of important recent research results, the references have been greatly expanded, and more advanced exercises have been added which have been used successfully in teaching the course.


Posted By

wintondeshong on 07/20/07


Tagged

textmate actionscript array printr


Versions (?)


print_r


Published in: ActionScript 


  1. private function print_r( obj, indent ) {
  2.  
  3. if (indent == null) indent = "";
  4. var out = "";
  5. for ( item in obj ) {
  6. if (typeof( obj[item] ) == "object" )
  7. out += indent+"[" + item + "] => Object\n";
  8. else
  9. out += indent+"[" + item + "] => " + obj[item]+"\n";
  10. out += print_r( obj[item], indent+" " );
  11. }
  12. return out;
  13. }

Report this snippet 

You need to login to post a comment.