note 48536 added to faq.html

From: Date: Tue, 28 Dec 2004 22:04:30 +0000
Subject: note 48536 added to faq.html
Groups: php.notes 
Request: Send a blank email to php-notes+get-82420@lists.php.net to get a copy of this message
You can avoid to use the "my_parameter[]" form-element names by generating your HTML form inputs like this: <form> <?php for ($n=0; $n<10; $n++) { ?> <input type="hidden" name="elem_<?= $n ?>"> <?php } ?> </form> And you access your data like this: <?php $arr = array(); for ($m=0; $m<10; $m++) { $arr[$m] = $_REQUEST["elem_$m"]; } ?> Nobody will know that you use PHP and in my opinion it is the most proper way. ---- Manual Page -- http://www.php.net/manual/en/faq.html.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48536 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48536&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48536&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48536&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48536&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48536&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48536&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48536&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82420) next »