note 25184 added to function.is-array
| From: | ldelahunty at britstream dot No_SPAM_PLEASE dot com | Date: | Fri, 13 Sep 2002 13:08:53 +0000 |
| Subject: | note 25184 added to function.is-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36630@lists.php.net to get a copy of this message | ||
// input from a form with arrays //
while (list($key,$val) = each($HTTP_POST_VARS)) {
$$key = $val;
if (is_array($val)) {
for ($i=0; $i<count($val); $i++) {
$content .= "$key: $val[$i]\n";
}
} else {
$content .= "$key: $val\n";
}
}
print nl2br($content); //or mail...
--
http://www.php.net/manual/en/function.is-array.php
http://master.php.net/manage/user-notes.php?action=edit+25184
http://master.php.net/manage/user-notes.php?action=delete+25184
http://master.php.net/manage/user-notes.php?action=reject+25184