Re: [PHP] getting an array out of the POST array

2004-08-17 Thread Matt M.
while (list ($key, $val) = each ($_POST[firstname])){ $_POST[firstname][$key] = trim($_POST[firstname][$key]); $_POST[middlename][$key] = trim($_POST[middlename][$key]); $_POST[lastname][$key] = trim($_POST[lastname][$key]); you might be able to get this one yourself.

RE: [PHP] getting an array out of the POST array

2004-08-17 Thread Ralph G
Remove $_POST from $_POST[firstname][$key], $_POST[middlename][$key] and $_POST[lastname][$key]. It should simply be $firstname[$key], $middlename[$key], and $lastname[$key] Not sure what your array data looks like but instead of using while() use foreach(): foreach($_POST['firstname'] as $key

RE: [PHP] getting an array out of the POST array

2004-08-17 Thread Ian M. Evans
Thanks, that worked. So I understand this better did this ($_POST[firstname][$key] = trim($_POST[firstname][$key]);) not work because the variable to the left of the '=' was no longer POSTed? Original Message Remove $_POST from $_POST[firstname][$key], $_POST[middlename][$key] and