note 26279 added to function.extract
| From: | jeff at j-maxx dot net | Date: | Thu, 24 Oct 2002 20:26:52 +0000 |
| Subject: | note 26279 added to function.extract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38519@lists.php.net to get a copy of this message | ||
I use extract alot to extract post variables and from mysql queries but on thing that bugs me is if
I want to manipulate the variables on their way out I have to resort to.
foreach($_POST as $name => $value){
$$name = custom_function($value);
}
Is there a quicker way or am I gonna have to wait for a feature like
extract($var_array, EXTR_PREFIX_SAME, NULL, custom_function($extract_specific_var_name_thingy));
This to me would be a very usefull feature. Just wondering if there is a good way to accomplish as
much in one line?
--
http://www.php.net/manual/en/function.extract.php
http://master.php.net/manage/user-notes.php?action=edit+26279
http://master.php.net/manage/user-notes.php?action=delete+26279
http://master.php.net/manage/user-notes.php?action=reject+26279