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
each() assigns four elements... (0 = index), (1 = value), (key = index), (value =
value)
You are concerned with key and value.
So: list ($fieldname, $value) = each($row)
You may not be using $value but you still need to assign the data to a variable. Or
list will only assign $fieldname the num
each() assigns four elements... (0 = index), (1 = value), (key = index), (value =
value)
You are concerned with key and value.
So: list ($fieldname, $value) = each($row)
You may not be using $value but you still need to assign the data to a variable. Or
list will only assign $fieldname the num
> $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:
4 matches
Mail list logo