1. Go to this page and download the library: Download flextype-components/arrays 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/ */
flextype-components / arrays example snippets
use Flextype\Component\Arrays;
Arrays::set($array, 'movies.the-thin-red-line.title', 'The Thin Red Line');
if (Arrays::has($array, 'movies.the-thin-red-line')) {
// Do something...
}
$array = [
'movies' => [
'the_thin_red_line' => [
'title' => 'The Thin Red Line',
'directed_by' => 'Terrence Malick',
'produced_by' => 'Robert Michael, Geisler Grant Hill, John Roberdeau',
'decription' => 'Adaptation of James Jones autobiographical 1962 novel, focusing on the conflict at Guadalcanal during the second World War.',
],
],
];
$newArray = Arrays::dot($array);
$array = [
'movies.the_thin_red_line.title' => 'The Thin Red Line',
'movies.the_thin_red_line.directed_by' => 'Terrence Malick',
'movies.the_thin_red_line.produced_by' => 'Robert Michael, Geisler Grant Hill, John Roberdeau',
'movies.the_thin_red_line.decription' => 'Adaptation of James Jones autobiographical 1962 novel, focusing on the conflict at Guadalcanal during the second World War.',
];
$newArray = Arrays::undot($array);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.