RE: [PHP-DEV] how-to get array[0] and array["name"] to actually r eference only 1 value?

From: Date: Mon, 12 Feb 2001 10:47:40 +0000
Subject: RE: [PHP-DEV] how-to get array[0] and array["name"] to actually r eference only 1 value?
Groups: php.dev 
Request: Send a blank email to php-dev+get-46418@lists.php.net to get a copy of this message
>Well, I guess that hacking the php source would work. :) However, I was >just thinking that you Could do something like this: >while (list ($key, $value) = mysql_fetch_array ($result, MYSQL_ASSOC)) { > $data[] =& $data[$key] = $value; >} I could, but since I'm writing a database abstraction module I'm wrapping the mysql-routines (and other db's as well, but since I just started it's only mysql for now). Anyway, basic functionality (including the references) now works on win, so I'll try and compile it on my Linux-box. Cheerio, Marc. (BTW, why a cc to the bug database?)

« previous php.dev (#46418) next »