I have a string like this: -
dev/clients/518/aaa/1915/bbb/1/file.pdf
and my aim is to be able to refer to file.pdf
via a multilevel object
dev->clients->518->aaa->1915->bbb->1
or an array
[dev][clients][518][aaa][1915][bbb][1]
This is a key from AWS S3 from which I am trying to create a navigable structure. I can explode the string to get
Array
(
[0] => dev
[1] => clients
[2] => 518
[3] => aaa
[4] => 1915
[5] => bbb
[6] => 1
[7] =>file.pdf
)
Not sure how to move forward from here. This might show what I'm after a little better: -
Array (
[dev] => Array (
[clients] => Array (
[518] => Array (
[aaa] => Array (
[1915] => Array (
[bbb] => Array (
[1] => file.pdf
)
)
)
)
)
)
)