Lines Matching defs:array
8 public static function get($array, $key, $default = null)
10 if (is_array($array) && array_key_exists($key, $array)) {
11 return $array[$key];
22 * Returns an array of all k-combinations from an input array of n elements, where k equals 1..n.
25 * Example: array[one, two] will give:
31 * @param array $array
32 * @return array
34 public static function allUniqueSortedCombinations($array)
36 $input = array_unique($array);
56 * Returns an array of unique k-combinations from an input array.
58 * Example: array=[one, two, three] and k=2 will give:
63 * @param array $array
65 * @return array
67 public static function combinations($array, $k)
69 $n = count($array);
76 $combination[] = $array[$index];