how do you write a function like print_r() that recursively prints objects?

Posted by significance on Stack Overflow See other posts from Stack Overflow or by significance
Published on 2010-03-26T15:15:24Z Indexed on 2010/03/26 15:33 UTC
Read the original article Hit count: 137

Filed under:
|
|

i want to write a function that prints multi-dimensional objects which are text (or integers, etc.) into <span></span> tags and arrays into unordered lists.

how do you make the function work recursively so that it prints everything regardless of what level it's at in the object?

thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about print-r