I have an array like this:
\'foo\', 1 => \'bar\', ..., x => \'foobar\' ); ?>
What is the fas
Try this:
$out = array(); $cur = &$out; foreach ($array as $value) { $cur[$value] = array(); $cur = &$cur[$value]; } $cur = null; print_r($out);
Grabbed it from another post.