|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-01-23 11:41 UTC] cynic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
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.