Page 1 of 1

Checking a $variable type

Posted: Sun Oct 26, 2003 9:39 pm
by Gen-ik
My brain has gone dead and I can't remember how to check the 'type' of a variable (it's been a while since I've used it)...... ie IF($VAR is an ARRAY){do something}

Posted: Sun Oct 26, 2003 9:40 pm
by volka
gettype() returns the type as string.
But you probably want is_array()

Posted: Sun Oct 26, 2003 9:43 pm
by Gen-ik
Cheers.