ArrayFly allows you to:
-
Change an array value from a file.
-
Get the array value from a file.
composer require vitorarantes/array-fly
<?php
use ArrayFly\ArrayFly;
$arrayFly = new ArrayFly('my-array-file.php');
echo $arrayFly->getValue('key1');
(output: value1)
$arrayFly->setValue('key1', 'value2')->save();
echo $arrayFly->getValue('key1');
(output: value2)