%

Bash: function array_key_exists()

Article published the ; modified the
One minute to read

This article has 56 words.
RAW source of the article:
Commit version: e21600e

Description

array_key_exists(): check if key exists into array!

Equivalent to the PHP Function PHP array_key_exists()

Source Code

Code: bash

Parameters

  • key is the searched key
  • haystack is the array where to search

Return Values

  • Returns 0 if the key found into haystack; considere this value as TRUE
  • Otherwise, returns 1: considere this value as FALSE

Example

Code: bash