I have a PHP array that prints the following information:
Array (
[0] => 23
[1] => 34
[2] => 35
[3] => 36
[4] => 37
[5] => 38
..<snip>..
)
I have the value and would like to cross reference it with the array to return a key. For instance, if I have a variable $value = 34 I would want to run a PHP function to return the key, which in this case is 1.
To be more specific, the array is stored in variable $pages and the value is stored in variable $nextID. I tried using array_search with no luck:
How do I go about this?