PHP code example of raziul / php-dot-array
1. Go to this page and download the library: Download raziul/php-dot-array 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/ */
raziul / php-dot-array example snippets
$data = [
'author' => [
'name' => 'Raziul Islam'
]
];
$data['author']['country']['name'] = 'Bangladesh';
echo $data['author']['country']['name']; // Bangladesh
Arr::set($data, 'author.name', 'Raziul Islam');
Arr::set($data, 'author.country.name', 'Bangladesh');
echo Arr::get($data, 'author.country.name');
composer