RE: [PHP] Validation problem with array.

From: Date: Thu, 21 Oct 2004 12:49:52 +0000
Subject: RE: [PHP] Validation problem with array.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199971@lists.php.net to get a copy of this message
[snip] > Right now I have this [right below]: If I want to > check for skys and slus, I add another set of braces > with if($sky != '' ... > and below "end if ($sky != '')........ > > > > foreach($skills as $key => $skill) > { > if ($skill != '' && $skys[$key] != '' && > $slus[$key] != '') > { > > $query = "INSERT INTO LurkProfiles_Skicerts > (SkicertID, ProfileID, SkilCerts, NumYear, Lused) > VALUES (null, $LID, '$skill', > $skys[$key],$slus[$key])"; > $res6 = run_query($query); > echo "Query $key = $query <br>"; > } end if ($skill != '') > > } That looks pretty much like what you want except for: } //end if ($skill != '') ^^ Comment, this is just to help identify what the brace is closing. Graham

« previous php.general (#199971) next »