Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dq5studios committed May 25, 2023
1 parent f5066b5 commit 768ab45
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -5,3 +5,25 @@
# entity_column

A drop-in replacement for `array_column()` that supports objects with getters.

## Usage

```php
function entity_column(array $array, string $column_key, string|null $index_key = null): array
```

### Parameters

array
> A multi-dimensional array or an array of objects from which to pull a column of values from.
column_key
> The column of values to return.
index_key
> The column to use as the index/keys for the returned array.

### Return Values

Returns an array of values representing a single column from the input array.

0 comments on commit 768ab45

Please sign in to comment.