Because, basically, in php an array is a hash with just numbers
as keys.
m.
--
Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5
ality.
-Anonymous
- Original Message -
From: "Jaxon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 21, 2001 8:07 PM
Subject: [PHP] mysql_fetch_array strangeness
> Hi,
>
> I'm trying to echo out the field names us
ality.
-Anonymous
- Original Message -
From: "Jaxon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 21, 2001 8:07 PM
Subject: [PHP] mysql_fetch_array strangeness
> Hi,
>
> I'm trying to echo out the field names us
> $rowData = mysql_fetch_array($result);
mysql_fetch_array can return an array with only numeric indices, only text
(fieldname) indices, *OR* *BOTH*, the default.
You need to use the "optional" argument:
$rowData = mysql_fetch_array($result, MYSQL_ASSOC);
By Day:
Hi,
I'm trying to echo out the field names used as key values in a
mysql_fetch_array:
$link_id = mysql_connect("localhost", "root", $pass);
mysql_select_db("database", $link_id);
$result = mysql_query("select * from lists where id = 1", $link_id);
$rowData = mysql_fetch_array($result);
while
5 matches
Mail list logo