Something like this should help:
if( is_array($preferred_location) ) {
#your code goes here.
}
In article <9csden$8qu$[EMAIL PROTECTED]> you write:
>I need to check that a form entry defined as an array contains a value
>before initiating the foreach code in my script.
>
>I have my form
Try enclosing the foreach inside an:
- if block which checks that count($preferred_location) > 0; or,
- if block which checks if it is defined, if($preferred_location).
Hopefully, one of these should work :)
Kirk
> -Original Message-
> From: Claudia [mailto:[EMAIL PROTECTED]]
> Sent: T
2 matches
Mail list logo