Re: [PHP] using an array with form list values

2001-05-03 Thread Philip Hallstrom
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

RE: [PHP] using an array with form list values

2001-05-03 Thread Johnson, Kirk
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