I've been struggling quite a bit with this. I have a folder with a list of files and a basic naming order - abc-def-xyz.php
I'm trying to create an index page to list all of the files automatically in groups. So:
abc-def-xyz.php
abc-def-xzz.php
abb-def-xyz.php
Would show in the php index page as:
abc
   def
      <a href="link/to/file">xyz</a>
      <a href="link/to/file">xzz</a>
abb
   def
      <a href="link/to/file">xyz</a>
I can get to the point of exploding the file names and removing the extension, then i'm just lost. Any advice would be much appreciated. Thank you!
Array
(
    [0] => Array (this is applyOnline-alert-warning.php)
    (
        [0] => applyOnline
        [1] => alert
        [2] => warning
    )
    [1] => Array
    (
        [0] => applyOnline
        [1] => collectionOrDelivery
    )
)
 
    