ID: 6950
Updated by: cynic
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 

extract() was recently changed to return the number of extracted variables, so I guess 
this can be closed.

Previous Comments:

[2000-09-29 19:59:34] [EMAIL PROTECTED]
Please make extract() return true if there was an array to process, or false if the 
value of the 'array' parameter was not an array  This change will  simplify iterating 
a database,  and may be usefile elsewhere.

After the following query:

   $Result = mysql_query( "SELECT Field1, Field2, Field3 FROM Table" );

you will be able to display the conents of the table with:

   while( extract( mysql_fetch_array( $Result )) {
      echo $Field1, $Field2, $Field3;

rather than:

   while( $A = mysql_fetch_array( $Result )) {
      extract( $A );
      echo $Field1, $Field2, $Field3;

This change should not affect backwards compatability, as existing users of extract() 
don't expect any return value.


Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to