note 21620 deleted from function.eval by didou
| From: | didou@php.net | Date: | Sat, 17 May 2003 14:41:20 +0000 |
| Subject: | note 21620 deleted from function.eval by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48145@lists.php.net to get a copy of this message | ||
Note Submitter: kickflip@gmx.li
even thoug it might be the worst way in the whole world to do it - this worked very nice for me:
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
//do something crazy with the $val
eval("\$" . "\$key = \"$val\";");
}
et voila! you have all your global vars with the value of choice.
actually this creates a new VARIABLE for each value in $keys and gives that new variable the value
$val.