# ArrayParser

> The class converts PostgreSQL array representation to PHP array

[API reference](/docs/api/index.md) › [yii](/docs/api/yii/index.md) › [db](/docs/api/yii/db/index.md) › [pgsql](/docs/api/yii/db/pgsql/index.md) › ArrayParser

| class | `yii\db\pgsql\ArrayParser` |
| --- | --- |
| Since | 2.0.14 |
| Source | [`framework/db/pgsql/ArrayParser.php`](https://github.com/yiisoft/yii2/blob/22.0/framework/db/pgsql/ArrayParser.php#L19) |

The class converts PostgreSQL array representation to PHP array

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`parse()`](#method-parse) | Convert array from PostgreSQL to PHP | `ArrayParser` |

## Method details

### parse() <span id="method-parse"></span>

```php
public function parse(string $value): array|null
```

Convert array from PostgreSQL to PHP

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `string` | String to be converted |

**Returns**

`array|null`