PHP code example of spacetab-io / obelix

1. Go to this page and download the library: Download spacetab-io/obelix library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spacetab-io / obelix example snippets



use Spacetab\Obelix;

$array = [
    'foo' => [
        'bar' => [
            'key1' => 1,
            'key2' => 2,
        ],
    ]
];

$dot = new Obelix\Dot($array);
$dot->get('foo.*.*')->getValue();
// [1, 2]

$dot->get('foo.*.*')->getMap();
// [
//   'foo.bar.key1' => 1,
//   'foo.bar.key2' => 2,
// ]