preg_split string to multidimensional array

Just take the arrays returned by preg_split() and build your tree structure out of them:

$tree = array();
foreach ( $strings as $string ) {
    $path = preg_split( '/(?<=[\/\\\])(?![\/\\\])/', $string );
    $ptr =& $tree;
    foreach ( $path as $elem ) {
        if ( ! array_key_exists( $elem, $ptr ) )
            $ptr[ $elem ] = array();
        $ptr =& $ptr[ $elem ];
    }
}

You're probably best off just using pathinfo()

http://uk.php.net/manual/en/function.pathinfo.php

And realpath() http://uk.php.net/manual/en/function.realpath.php

I assume you're trying to map a *nix directory to a Windows one?