What does "Array *RECURSION*" mean?

Hi!

I am generating an array (over 1000 keys) and the following message gets added to the end of the array:

Array *RECURSION*

What does this mean?

your description can help not.

generating an array cannot produce such an error.

you should be more talkative. “I am doing an array of all veriables in the script…” and so on

When print_r is used to examine an array or object it will print RECURSION when it encounters a reference in that array or object back to itself or another element that has already been listed. I see this quite a bit in my own tracebacks - my table object holds an array of field objects. Each field object has a reference back to that table object. This is a circular reference, so rather than get caught in an infinite loop the print_r statement informs you of the recursion.

Now if you aren’t expecting there to be recursion there you may have a problem. But that’s what causes that print out.

Thanks, that makes sense :slight_smile:

I did not know that, thanks Michael_Morris