Page 1 of 1

key of value

Posted: Mon Oct 17, 2005 6:41 am
by shiznatix
Weirdan | Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
is there a function to get the key of a array value? like

Code: Select all

array (
  [4] = 'bling'
  [54] = 'blop'
)
could i just search for blop and it return 54?
Weirdan | Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Mon Oct 17, 2005 7:18 am
by foobar
array_search();

The PHP Manual is your friend.

Posted: Mon Oct 17, 2005 7:57 am
by shiznatix
ok cool.

SORRY WEIRD DAN! i got a bit to cocky there didn't i :lol: