public static function selectArrayOption(array $options, $prompt = null)
    {
        $transform = [];
        if ($prompt) {
            $transform[] = ['value' => 0, 'label' => $prompt];
        }
        foreach ($options as $key => $value) {
            $transform[] = ['value' => $key, 'label' => $value];
        }
    
        return $transform;
    }
public static function selectArrayOption(array $options, $prompt = null)
    {
        $transform = [];
        if ($prompt) {
            $transform[] = ['value' => 0, 'label' => $prompt];
        }
        foreach ($options as $key => $value) {
            $transform[] = ['value' => $key, 'label' => $value];
        }
    
        return $transform;
    }
public static function selectArrayOption ( array $ options , $ prompt = null ) { $ transform = [ ] ; if ( $ prompt ) { $ transform [ ] = [ 'value' => 0 , 'label' => $ prompt ] ; } foreach ( $ options as $ key => $ value ) { $ transform [ ] = [ 'value' => $ key , 'label' => $ value ] ; } return $ transform ; }
Create the options array for a zaa-select field based on an key value pairing
array.

In order to provide a prompt message which displayes when nothing is selected us the $prompt param.

In order to get a key value pairing directly from an ActiveRecord Model use:

```php
return Tag::find()->select(['name'])->indexBy('id')->column();
```

@param array $options The key value array pairing the select array should be created from.
@param string $prompt The prompt message when nothing is selected (contains the value 0 by default).
@return array
@since 1.0.0
Create the options array for a zaa - select field based on an key value pairing array .