note 25509 deleted from function.extract by aidan

From: Date: Thu, 09 Sep 2004 09:14:41 +0000
Subject: note 25509 deleted from function.extract by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76293@lists.php.net to get a copy of this message
Note Submitter: blistedus(a)yahoo()com ---- If you're using extract with mysql_fetch_assoc, and only grabbing one line you can nestle it: extract(mysql_fetch_assoc(mysql_query("SELECT * FROM table"))); If you're doing this in a while statement it will fail. Using something like... $mysql_data = mysql_query("SELECT * FROM everywhere"); while (extract(mysql_fetch_assoc($mysql_data))) { .. } ...will not work, while using... while ($row = mysql_fetch_assoc($mysql_data)) { extract($row); ... } ...will. The only reason I find as an explination for this is annoyance.

« previous php.notes (#76293) next »