Get index of array member with specified key

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

@return false|int|string
499527
public function key_search( array $array, $key, $value ) {
		foreach ( $array as $key => $a ) {
			if ( isset( $a[ $key ] ) && $a[ $key ] == $value ) {
				return $key;
			}
		}

		return false;
	}
1135840
protected function setIntoArray(&$array, $keys, $value)
    {
        $k = array_shift($keys);

        if (is_scalar($array)) {
            $array = (array) $array;
        }

        if (!isset($array[$k])) {
            $array[$k] = null;
        }

        if (empty($keys)) {
            return $array[$k] = &$value;
        }

        return $this->setIntoArray($array[$k], $keys, $value);
    }
1054150
protected function addDefault(array &$array, $key, $value)
    {
        if (empty($array[$key]) && !empty($value)) {
            $array[$key] = $value;
            return true;
        }
        return false;
    }
1265958
private function recurArrayChange($array, $keyArray, $value = null)
    {
        $key0 = $keyArray[0];
        if (count($keyArray) === 1) {
            $this->changeValue($array, $key0, $value);
        } else if (is_array($array) && isset($keyArray[1])) {
            unset($keyArray[0]);
            $keyArray = array_values($keyArray);
            if (!isset($array[$key0])) {
                $array[$key0] = [];
            }
            $array[$key0] = $this->recurArrayChange($array[$key0], $keyArray, $value);
        } else {
            $this->changeValue($array, $key0, $value);
        }
        return $array;
    }
460575
public function array_combine( array $array, $key, $value = null ) {
		$keys   = $this->array_pluck( $array, $key );
		$values = empty( $value ) ? $array : $this->array_pluck( $array, $value );

		return array_combine( $keys, $values );
	}
236285
public function getMemberItems($array, $id=0)
	{
		if($id === 0) $id = Session::get('id');

		$values = [];
		foreach ($array as $k) {
			$temp = Member::find($id)->$k;
			$values[] = $temp;
		}
		return $values;
	}
687943
public static function column(array $array, $key, $index = null)
    {
        if (function_exists('array_column')) {
            return array_column($array, $key, $index);
        }

        $out = [];
        array_walk(
            $array,
            function ($item) use ($key, $index, &$out) {
                null !== $index ? $out[$item[$index]] = $item[$key] : $out[] = $item[$key];
            }
        );

        return $out;
    }
775153
protected function getValue($key, array $array = array())
    {
        $keys = $this->parseKey($key);

        while (count($keys) > 0 and !is_null($array)) {
            $key = array_shift($keys);
            $array = isset($array[$key]) ? $array[$key] : null;
        }

        return $array;
    }
59495
private function array_get($array, $key, $default = null)
	{
		if (is_null($key)) return $array;
		foreach (explode('.', $key) as $segment)
		{
			if ( ! is_array($array) or ! array_key_exists($segment, $array))
			{
				return $default;
			}
			$array = $array[$segment] ?: $default;
		}
		return $array;
	}
1272701
public static function set(&$array, $key, $value)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '')
        {
            return ($array = $value);
        }

        $keys = explode('.', $key);
        $last = array_pop($keys);
        $currentElement =& $array;

        foreach ($keys as $currentKey)
        {
            if (!array_key_exists($currentKey, $currentElement) || !is_array($currentElement[$currentKey]))
            {
                $currentElement[$currentKey] = [];
            }

            $currentElement =& $currentElement[$currentKey];
        }

        $currentElement[$last] = $value;

        return $array;
    }
1271909
public static function isIndexed(array $array)
    {
        $i = 0;
        foreach (array_keys($array) as $k) {
            if ($k !== $i) {
                return false;
            }
            $i++;
        }
        return true;
    }
461054
public static function isKeyWithElements($array, $key)
    {
        if (false === is_array($array) || false === isset($array[$key])) {
            return false;
        }

        if (false === is_array($array[$key])) {
            return false;
        }

        if (0 === count($array[$key])) {
            return false;
        }

        return true;
    }
741958
public static function get($array, $key, $default = null)
    {
        return is_array($key)
            ? static::getArray($array, $key, $default)
            : parent::get($array, $key, $default);
    }
915946
public static function searchByColumnValue(array $array, $column, $value, bool $strict = false)
    {
        foreach ($array as $row) {
            if (!$strict && $row[$column] == $value) {
                return $row;
            } elseif ($strict && $row[$column] === $value) {
                return $row;
            }
        }

        return null;
    }
211769
static private function recursionGetValue($array,array $keys)
    {
        if (! is_array($array) && ! empty($keys)) {
            return null;
        }
        if (empty($keys)) {
            return $array;
        }
        if (! isset($array[$keys[0]])) {
            return null;
        }
        return self::recursionGetValue($array[$keys[0]],array_slice($keys,1));
    }
394219
public static function indexBy(Array $array, $property) {
    $ret = array();

    if (count($array) > 0) {
      $index = Util::castGetterFromSample($property, current($array));

      foreach ($array as $item) {
        $ret[$index($item)] = $item;
      }
    }

    return $ret;
  }
412093
public static function key($key, $array, $returnValue = false)
    {
        $isExists = array_key_exists((string)$key, (array)$array);

        if ($returnValue) {
            if ($isExists) {
                return $array[$key];
            }

            return null;
        }

        return $isExists;
    }