src/Sulu/Component/Rest/Listing/ListRepository.php
private function getArrayIndexByKeyValue($array, $value, $key = 'id')
    {
        foreach ($array as $index => $result) {
            if ($result[$key] === $value) {
                return $index;
            }
        }

        return false;
    }
private function getArrayIndexByKeyValue($array, $value, $key = 'id')
    {
        foreach ($array as $index => $result) {
            if ($result[$key] === $value) {
                return $index;
            }
        }

        return false;
    }
private function getArrayIndexByKeyValue ( $ array , $ value , $ key = 'id' ) { foreach ( $ array as $ index => $ result ) { if ( $ result [ $ key ] === $ value ) { return $ index ; } } return false ; }
returns array index of by a specified key value.

@param $array
@param $value
@param string $key

@return bool|int|string
returns array index of by a specified key value .