Forum Moderators: coopster

Message Too Old, No Replies

... is_array function

         

electricocean

11:06 pm on Jun 12, 2005 (gmt 0)

10+ Year Member



I am not really undertanding this. Can this check the keys or values or both?

I am looking at php.net and it doesn't say.

thanks.

electricocean

MattAU

5:12 am on Jun 13, 2005 (gmt 0)

10+ Year Member



is_array simply checks whether a variable is an array or not and returns true or false. It's nothing to do with keys or values.

ekram

5:27 am on Jun 13, 2005 (gmt 0)

10+ Year Member



[php.net...]

check the url.

see the examples.

electricocean

9:28 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



i was wondering if that would be that way to go to see if a key was in an array, else do something else. But I guess not.

electricocean

coopster

9:30 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Naw, use array_key_exists() [php.net]