Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- how to check if variable is an array?
June 28, 2007, 4:21 pm
rate this thread
Re: how to check if variable is an array?
In your standard function library yeah? ;)
Just pointed it out, as it's normally no problem in PHP to juggle types as
one goes, but the difference between scalar & non-scalar is often
significant for functions, so a simple test is_scalar() offcourse beats
(!is_array()&&!is_object()&&!is_resource()) or (is_string()||is_float()).