On 05 March 2004 09:38, Torsten Lange wrote:
Hello,
I receive an array from an OCIFetchStatement() and want to
address its
elements by indices, which fails. The original select has two columns.
How do I have to visualize that array? I want to load it into an
option list. I tried also some examples with
while(list...), but it
can not work until I don't know the structure.
If your column names are, say, ID and NAME, then the array looks like this:
Array ('ID' = Array ('id1', 'id2', 'id3', ...),
'NAME' = Array ('name1', 'name2', 'name3', ...)
)
So the rows of your query result are:
$arr['ID'][0], $arr['NAME'][0]
$arr['ID'][1], $arr['NAME'][1]
$arr['ID'][2], $arr['NAME'][2]
... etc. ...
HTH
Cheers!
Mike
-
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php