2 dim array

From: Date: Fri, 13 Oct 2000 14:22:07 +0000
Subject: 2 dim array
Groups: php.db 
Request: Send a blank email to php-db+get-3590@lists.php.net to get a copy of this message
Hi: I am passing a bunch of form values from HTTP_POST_VARS to $frm. There are some form values which are passed into $frm as an array already (i.e. glenum[])...So I am assuming that the array is passed into $frm and what I am getting is: $frm[name]=Jane Public $frm[address]=123 Main St. $frm[glenum][1]=Some value $frm[glenum][2]=some other value ...etc Is this correct? The problem I am having is in traversing the $frm[glenum][] array and updating the db with those values... I tried this with no luck: $glearray = $frm["glenum"]; while (list ($key1) = each ($glearray)) { while (list ($key2, $val) = each ($glearray["$key1"])) { $qid = db_query(" INSERT INTO lesson_gle (l_id, glenum) VALUES ('$id', '$val') "); } } Any ideas? Thanks! __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.db (#3590) next »