<?php
function assignArrayByPath(&$arr, $path, $value, $separator='.') {
$keys = explode($separator, $path);
foreach ($keys as $key) {
$arr = &$arr[$key];
}
$arr = $value;
}
$arr = array('test'=> false);
assignArrayByPath($arr, 'test.something', true);
var_dump($arr);