Also, even though [0] and ['id'] initially contain the same value, they are
not bound together in any way. You may be able to accomplish what you
desire by using references. (See the manual section on references for more
information.
ie. $q-data[0]["id"] = $q-data[0][0];
How can I create
Well, I guess that hacking the php source would work. :) However, I was
just thinking that you Could do something like this:
(Note - not tested! :)
while (list ($key, $value) = mysql_fetch_array ($result, MYSQL_ASSOC)) {
$data[] = $data[$key] = $value;
}
--zak
- Original 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
What I'm trying to do is get the following php-script to work... (the only
thing about this that doesn't work is in the fourth 'echo' line...)
$db = dbx_connect("mysql", "localhost", "username", "password"); // works
$result = dbx_query($db, "use dbname"); // works
$q = dbx_query($db, "select
This list is for discussing issues that relate to the development of the PHP
language. For mailing lists that discuss development with PHP, see
www.php.net/support.php
Also, even though [0] and ['id'] initially contain the same value, they are
not bound together in any way. You may be able to