The position of an element.
One can apply array_keys twice to get the position of an element from its key. (This is the reverse of the function by cristianDOTzuddas.) E.g., the following may output "yes, we have bananas at position 0".
<?php
$a = array("banana" => "yellow", "apple" = "red");
$k = get_some_fruit();
if (isset($a[$k]))
{
list($pos) = array_keys(array_keys($a), $k);
print "yes, we have {$k}s at position $pos\n";
}
?>
Not amazingly efficient, but I see no better alternative.