Pile for PHP can return a value of a multidimensional array or object (or mixed). When the searched value can not be found (due to not existing keys for example) Pile will return null
.
The preffered way getting Pile is requireing it via composer:
composer require neubert/pile
If you'd like to download Pile to your project you can click here:
<?php
use Neubert\Pile;
// sample array
$foo = (object) [
'key-1' => [
'key-2' => [
'key-3' => 'bar'
]
]
];
// echos 'bar'
echo Pile::find($foo, 'key-1', 'key-2', 'key-3');
Pile is released under the MIT License. See the bundled LICENSE file for details.