if i know the value,how can i get the key of the value? is there a function?
thanks.
Chaos
I don't think there's a function, you could use a foreach loop tho
foreach($array as $k=>$v) { if($v == $value) { $keyname = $k; } }
There is a function. Two, in fact. [man]array_search[/man] and [man]array_keys[/man].
oooh, they might come in handy 😉 I knew I shoulda looked at the manual! Thanks Weedpacket