Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
That data would need need to go in a format like that below to work with the function I have. The ID is irrelevant to my purposes since the link to the report is the same as the report name so I would have to change the function to suit. That said, I need to take the path above and turn it into an array like that below.
/Production/Analyst/POS Sales Excel Data Export /Production/Analyst/STATS Membership Tracking - RAW /Production/Information Technologies/IT Dashboard DUMMY /Production/Information Technologies/IT Department /Production/Membership/MDash /Production/Membership/Membership Dashboard /Production/Membership/Membership Reports/Membership Grid /Production/Membership/Membership Reports/Membership Grid by SU /Production/Membership/Membership Reports/Membership Pie Charts /Production/Membership/Membership Reports/Membership Sum Drill Down /Production/Membership/Membership Reports/POS Sales By Date and Location /Production/Membership/Stats/STATS Council Participation /Production/Membership/Stats/STATS Council SU Summary Adults /Production/Membership/Stats/STATS Council Summary Adults /Production/Membership/Stats/STATS Council Troop Summary Adults /Production/Membership/Stats/STATS Lifetime Stats /Production/Membership/Stats/STATS Membership Tracking /Production/Online Training (LMS)/LMS User ID Lookup /Production/Online Training (LMS)/Manager Training 2014 /Production/Shop/POS Reports/POS Sales By Date and Location /Production/Shop/Shop Dashboard DUMMY /Production/SLT Dashboard/OLD Dashboard Membership_Overview
So, how do convert the data I'm working with into an array that will output a format like the snippet above? I've been looking at a lot of sites trying to understand more about arrays - I'm starting to see the light but still need some help in the right direction. Any help would be greatly appreciated.
$nested = Array ( 1 => Array ('parent' => 0, 'title' => 'Analyst'), 2 => Array ('parent' => 0, 'title' => 'Membership'), 3 => Array ('parent' => 0, 'title' => 'SLT Dashboard'), 4 => Array ('parent' => '1', 'title' => 'POS Sales Excel Data Export'), 5 => Array ('parent' => '1', 'title' => 'STATS Membership Tracking - RAW'), 6 => Array ('parent' => '2', 'title' => 'Membership Dashboard'), 7 => Array ('parent' => '6', 'title' => 'Membership Grid'), 8 => Array ('parent' => '6', 'title' => 'Membership Grid by Service Unit'), );
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.