public static function CreateDeepArray($ArrayPath,
$Separator,
$Value) { // assigns $Value to a nested array path:
// $foo = self::CreateDeepArray('/path/to/my', '/', 'file.txt')
// is the same as:
// $foo = array('path'=>array('to'=>'array('my'=>array('file.txt'))));
// or
// $foo['path']['to']['my'] = 'file.txt';
$ArrayPath =
ltrim($ArrayPath,
$Separator);
$ReturnedArray = array
();
if (($pos =
strpos($ArrayPath,
$Separator)) !== false
) { $ReturnedArray[substr($ArrayPath, 0,
$pos)] = self::
CreateDeepArray(substr($ArrayPath,
$pos + 1
),
$Separator,
$Value);
} else { $ReturnedArray[$ArrayPath] =
$Value;
} return $ReturnedArray;
} /**
* @param array $arraydata
* @param bool $returnkey
*
* @return int|false
*/