Home

Broom Demo

GitHub

Original Options

Array
(
    [1] => Red
    [2] => Blue
    [3] => Green
)

Option Value

\App\Color::optionValue(2) => Blue

Option Key

\App\Color::optionKey('Green') => 3

All Values

Array
(
    [0] => Red
    [1] => Blue
    [2] => Green
)

All Keys

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)

Random Value

Red

Random Key

2

With Default Title

Array
(
    [] => Pick one
    [1] => Red
    [2] => Blue
    [3] => Green
)
Array
(
    [-99] => Pick one
    [1] => Red
    [2] => Blue
    [3] => Green
)

© Sukohi Kuhoh :)