$collection->keyOf($needle)

Tries to find the key for the given element

  • $needle (mixed)
    the element to search for
  • return (mixed)
    the name of the key or false