PHP code example of enzyme / freckle

1. Go to this page and download the library: Download enzyme/freckle 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/ */

    

enzyme / freckle example snippets


$array = [
    'users' => [
        'jane123' => ['name' => 'Jane Foo'],
        'bob456'  => ['name' => 'Bob Foo'],
    ]
];

use Enzyme\Freckle\Dot;

$array = [
    'users' => [
        'jane123' => ['name' => 'Jane Foo'],
        'bob456'  => ['name' => 'Bob Foo'],
    ]
];

$dot = new Dot;
$full_name = $dot->get($array, 'users.bob456.name'); // returns "Bob Foo".

use Enzyme\Freckle\Dot;

$array = [
    'users' => [
        0 => [
            'jane123' => ['name' => 'Jane Foo'],
        ],
        1 => [
            'bob456'  => ['name' => 'Bob Foo'],
        ]
    ]
];

$dot = new Dot;
$full_name = $dot->get($array, 'users.bob456.name'); // returns "Bob Foo".