Say I have an array:
$my_arr = ['folder1/', 'file2.png', 'file3.png', 'file4.png', 'file5.png', 'folder2/', 'file1.png', 'file6.png'];
And I want to make a multidimensional array categorized by the folders. Since it's not an associative array, I'm having trouble finding a way to split it on the folder values and having the files input into the same array.
Sorry if this doesn't make sense, I'm new to PHP and not finding anything on it thus far.