Re: extract() expects first argument to be an array

From: Date: Sat, 18 Jan 2003 00:13:57 +0000
Subject: Re: extract() expects first argument to be an array
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-24923@lists.php.net to get a copy of this message
on 1/17/03 7:02 PM, Addison Ellis at addison@bellsouth.net appended the following bits to my mbox: > Warning: extract() expects first argument to be an array in > /users/infoserv/web/register/ca/new_account.php on line 82 > $result = mysql_query($sql) > or die("Couldn't execute query 1."); > $row = mysql_fetch_array($result); > extract($row); Two guesses: 1) the query isn't returning any data, so you're not getting an array assigned to the $row variable 2) you need to pass a regular associative array to extract, not the "combo" one that MySQL_fetch_array returns. Try using MySQL_fetch_assoc instead. Hope that helps. Sincerely, Paul Burney <http://paulburney.com/> Q: Tired of creating admin interfaces to your MySQL web applications? A: Use MySTRI instead. <http://www.burney.ws/software/mystri/>

« previous php.db (#24923) next »