note 19151 deleted from ref.mysql by didou

From: Date: Mon, 06 Oct 2003 14:09:24 +0000
Subject: note 19151 deleted from ref.mysql by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57895@lists.php.net to get a copy of this message
Note Submitter: kekoa13@yahoo.com ---- I find it the least problematic to simply use the list() construct to assign variables from an array returned from the mysql_fetch_row() & others. $data = mysql_query("SELECT name, data FROM table"); while(list($t_name, $t_data) = mysql_fetch_row($data)) { echo "Name: $t_name Data: $t_data\n"; } It's not too difficult to maintain something like this, since the list() variables mirror the fields being queried. It gets messy when you have more than 10 fields you are working with.

« previous php.notes (#57895) next »