note 26667 deleted from function.mysql-fetch-object by didou

From: Date: Sat, 17 May 2003 20:36:50 +0000
Subject: note 26667 deleted from function.mysql-fetch-object by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48239@lists.php.net to get a copy of this message
Note Submitter: mw@suk.net If you want to for instance fetch all results in one step and save them in an array then use something like: $rs = mysql_query("select a, b, c from example"); // create the array $example_array = array(); for ($i = 0; $i < $rs; $i++) { $example_array[$i] = array(); $example_array[$i] = mysql_fetch_object($rs);} Now you can access those fields with instance like $example_array[0]->a;

« previous php.notes (#48239) next »