|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-20 20:06 UTC] jim at cvs dot php dot net
[1999-09-12 20:57 UTC] zeev at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
[ This has been informally submitted to the mailing list yesterday. -- KK ] I can have <input type="text" name="sem[326-436-02]" value="x"> <input type="text" name="sem[326-436-03]" value="y"> and have php return $sem as an array to me, if I chose to import my form variables into the normal namespace. I cannot have that with <input type="text" name="sem[326-436-02][startdate]" value="x"> <input type="text" name="sem[326-436-03][enddate]" value="y"> and get a two dimensional array returned? Instead, I get key 326-185-01][sem_beginn value 16.02.1998 key 326-185-01][sem_ende value 20.02.1998 printed by the following code: function save_record($i) { global $sem; for (reset($sem); $i = key($sem); next($sem)) { printf("key %s value %s<p>\n", $i, $sem[$i]); } } and for (reset($sem[$i]); $j = key($sem[i]); next($sem[i])) { printf("key %s value %s<p>\n", $j, $sem[$j]); } explodes (with $i having the value "326-185-01") with an error Warning: Variable passed to reset() is not an array or object in /webpages/verwaltung/sem/details.php3 on line 240