# give/4.16.8.1/src/FormAPI/Form/Select.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8.1. 36 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/FormAPI/Form/Select.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/FormAPI/Form/Select.php
- Modified: 2022-01-20T06:45:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.8.1/code/src/FormAPI/Form/Select.php#L10-L20`.

```php
<?php

namespace Give\FormAPI\Form;

class Select extends Field
{

    /**
     * @var array
     */
    public $options = [];

    /**
     * @inheritDoc
     */
    public function parse($array)
    {
        parent::parse($array);

        $this->options = isset($array[ 'options' ]) ? $array[ 'options' ] : [];
    }

    /**
     * @inheritDoc
     */
    public function toArray()
    {
        return array_merge(
            parent::toArray(),
            [
                'options' => $this->options,
            ]
        );
    }
}

```
