src/bbn/x.php
public static function min_with_key($array, $key){
    if (!\is_array($array) || \count($array) == 0) return false;
    $min = $array[0][$key];
    foreach($array as $a){
      if($a[$key] < $min){
        $min = $a[$key];
      }
    }
    return $min;
  }
public static function min_with_key($array, $key){
    if (!\is_array($array) || \count($array) == 0) return false;
    $min = $array[0][$key];
    foreach($array as $a){
      if($a[$key] < $min){
        $min = $a[$key];
      }
    }
    return $min;
  }
public static function min_with_key ( $ array , $ key ) { if ( ! \ is_array ( $ array ) || \ count ( $ array ) == 0 ) return false ; $ min = $ array [ 0 ] [ $ key ] ; foreach ( $ array as $ a ) { if ( $ a [ $ key ] < $ min ) { $ min = $ a [ $ key ] ; } } return $ min ; }
Returns the minimum value of an index from a multidimensional array.

```php
\bbn\x::min_with_key([
['age' => 1, 'name' => 'Michelle'],
['age' => 8, 'name' => 'John'],
['age' => 45, 'name' => 'Sarah'],
['age' => 45, 'name' => 'Camilla'],
['age' => 2, 'name' => 'Allison']
], 'age');
// int  1
```

@param array $array A multidimensional array.
@param string $key The index where to search.
@return mixed value
Returns the minimum value of an index from a multidimensional array .