Need help accessing the values of an array in a form ...
| From: | John Kelly | Date: | Wed, 22 May 2002 23:59:33 +0000 |
| Subject: | Need help accessing the values of an array in a form ... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98838@lists.php.net to get a copy of this message | ||
Hi, I have a form using the post method that outputs a dynamic number of
fields each time with the same name but different values - this is required.
For example ...
filename[]
filename[]
filename[]
filename[]
On the next page I try to access the array using ...
for($i=0; $i<count($filename); $i++) {
$value = $filename[$i];
do something with $value ...
}
but $filename[0], $filename[1], $filename[2], etc each contain one letter
from the word "Array" if there were say five items in the array!? What am I
doing wrong and/or how do I get the actual values?