2017 © Pedro Peláez
 

library arr

A safe way to get values from arrays

image

appzz/arr

A safe way to get values from arrays

  • Sunday, May 7, 2017
  • by CoolSwitcher
  • Repository
  • 1 Watchers
  • 0 Stars
  • 101 Installations
  • PHP
  • 7 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

README

Simple and safest way to get values from arrays., (*1)

Example:, (*2)

#!php

use \AppZz\Helpers\Arr as Arr;
$arr = [
    'foo' => '123',
    'bar' => '456',
    'qwe' => [
        'a'=>'ert',
        'b'=>'asd',
        'c'=>[
            'aa'=>2,
            'bb'=>3
        ]
    ]
];

var_dump(Arr::get($arr, 'foo'));
var_dump(Arr::get($arr, 'foo1'));
var_dump(Arr::get($arr, 'foo1', 3));
var_dump(Arr::get($arr, 'bar'));
var_dump(Arr::path($arr, 'qwe.a'));
var_dump(Arr::path($arr, 'qwe.b'));
var_dump(Arr::path($arr, 'qwe.aa'));
var_dump(Arr::path($arr, 'qwe.c.aa'));
var_dump(Arr::path($arr, 'qwe#c#aa', '#'));
var_dump(Arr::path($arr, 'qwe#c#aaa', '#', 22));

The Versions

07/05 2017

dev-master

9999999-dev https://github.com/a-pp-zz/arr

A safe way to get values from arrays

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar CoolSwitcher

array arr

07/05 2017

1.0.4

1.0.4.0 https://github.com/a-pp-zz/arr

A safe way to get values from arrays

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar CoolSwitcher

array arr

24/07 2016

1.0.1

1.0.1.0 https://www.bitbucket.org/a-pp-zz/arr.git

A safe way to get values from arrays

  Sources   Download

Apache-2.0

The Requires

  • php >=5.0.0

 

by Avatar CoolSwitcher

array arr

11/06 2016

1.0.0

1.0.0.0 https://www.bitbucket.org/a-pp-zz/arr.git

A safe way to get values from arrays

  Sources   Download

Apache-2.0

The Requires

  • php >=5.0.0

 

by Avatar CoolSwitcher

array arr