A kind of array (hashtable)
| From: | Christian Ista | Date: | Tue, 13 Aug 2002 12:07:31 +0000 |
| Subject: | A kind of array (hashtable) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112303@lists.php.net to get a copy of this message | ||
Hello,
In some language (like Java, C#, ...) you can find a hashtable.
I execute query, this query return some records, each records are composed
by 2 fields. I'd like to put these records in a 2 dimensions array (or
something like that) and find easily the records I want.
An example, the query return (field1/field2):
mytext1 / "text for my text 1"
mytext2 / "text for my text 2"
mytext3 / "text for my text 3"
mytext4 / "text for my text 4"
I'd like to put that in an array, but not find the text by myarray[2],
myarray[4] but by myarray['mytext2'], ['mytext2'] have to return "text for
my text 2"
Possible to do that ?
Bye