Page 1 of 1

Check if array

Posted: Wed Mar 01, 2006 6:04 am
by php3ch0
How can I check if a variable is an array?

I am updating a script to use arrays

I am loading the data from a database and need to check if the data in the database is in the old format (string) and if it is convert it to the new format (base64encode(serialize($array)))

Please help

Posted: Wed Mar 01, 2006 6:44 am
by onion2k
is_array()

Posted: Wed Mar 01, 2006 6:48 am
by php3ch0
Thanks

I thought it would be something nice and simple like that.