in reply to Return value given a key
The answer is that if you want to find a key belonging to a certain value, you should have used a different datastructure. In a hash, keys are unique, values don't have to. The entire point of a hash is to be able to search with keys - if you want to search with the values, you should have used the values as the keys, and the keys as the values.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Return value given a key
by monarch (Priest) on Nov 22, 2005 at 13:01 UTC |