note 13631 deleted from function.mysql-fetch-array by betz

From: Date: Wed, 05 Oct 2005 11:34:26 +0000
Subject: note 13631 deleted from function.mysql-fetch-array by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96430@lists.php.net to get a copy of this message
Note Submitter: ---- actually with php 4.0.5 mysql_fetch_assoc DOES set NULL fields, so you can safely overwrite existing values with $result = mysql_query($some_query); while($row=mysql_fetch_assoc($result)){ extract($row); // ... } extract will do the job of walking through the associative array and setting the variables $$key to $value for you even when $value is NULL mysql_fetch_row also consistently retrieves NULL values with the correct indices Ivan

« previous php.notes (#96430) next »