Page 1 of 1

identifying an array

Posted: Mon Oct 14, 2013 7:06 pm
by edgore
Is there any way to determine if a variable is an other than checking to see if the keys of a variable are not empty? I couldn't think of one. One thing I have learned though is that there is usually a better way of doing *anything* than the only way that I can think of to do it.

Re: identifying an array

Posted: Mon Oct 14, 2013 11:05 pm
by dunbarx
Hi.

This seems like an elegant and simple way, to check the keys. But you can always:

if yourVariable is an array then answer "Yes it is"

Craig

Re: identifying an array

Posted: Tue Oct 15, 2013 8:10 pm
by edgore
Ah. See, I like your way better because it seems much more readable.