From: [EMAIL PROTECTED]
Operating system: Linux 2.2 (glibc 2.1)
PHP version: 4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description: Suggestion for "extract" function
The extract() function is a big help, but it would be even better if it returned some
information about whether it assigned any variables, rather than just returning NULL.
What I really want is for the following code:
while($row = mysql_fetch_array($result)) {
extract($row);
//do something with the variables
}
to become this:
while(extract(mysql_fetch_array($result)))
//do something with the variables
This would be possible if extract() returned any of the following:
-0 or 1 to indicate whether any variables were assigned
-the number of variables assigned
-or even the array it was given in the first place
Just a thought...
Brian
--
Edit Bug report at: http://bugs.php.net/?id=9800&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]