remove() public static method
Removes an item from an array and returns the value. If the key does not exist in the array, the default value will be returned instead. Usage examples, // $array = ['type' => 'A', 'options' => [1, 2]];
// working with array
$type = \yii\helpers\ArrayHelper::remove($array, 'type');
// $array content
// $array = ['options' => [1, 2]];
public static mixed|null remove ( &$array, $key, $default = null )$array array
The array to extract value from