moxemus/array-helper

Array helper to extend default array functions.

1.6.1 2025-03-15 09:43 UTC

This package is not auto-updated.

Last update: 2025-06-08 00:04:58 UTC


README

Just add the package to your project using Composer:

composer require moxemus/array-helper

Usage

Add Helper class in your project and use like a static class:

use moxemus\array\Helper as ArrayHelper;

$data = [
    'a' => 'word',
    12,5 => 23,
    null => false
];

$realFirstIndex = ArrayHelper::getFirstIndex($data); #: 'a'
$realFirstValue = ArrayHelper::getFirstValue($data); #: 'word'