Я получил следующее извлеченное из массива.
[TheBeautifulSouth/2-15 One Last Love Song.m4a] => Array
(
[name] => TheBeautifulSouth/2-15 One Last Love Song.m4a
[time] => 1296612503
[size] => 7628998
[hash] => 4c6d9b19310ad53efccc5df2e0632e82
)
[TheBeautifulSouth/2-16 Mirror.m4a] => Array
(
[name] => TheBeautifulSouth/2-16 Mirror.m4a
[time] => 1296612568
[size] => 8418448
[hash] => ef371e227b410bb4c9ed1ff7f2d0d70e
)
[TheBeautifulSouth/2-17 One God.m4a] => Array
(
[name] => TheBeautifulSouth/2-17 One God.m4a
[time] => 1296612639
[size] => 8619393
[hash] => 80f29fbef6f469e3f150f7011a320987
)
[TheBeautifulSouth/2-18 Blackbird On the Wire (Radio Ed.m4a] => Array
(
[name] => TheBeautifulSouth/2-18 Blackbird On the Wire (Radio Ed.m4a
[time] => 1296612712
[size] => 6776214
[hash] => fe13ced4b9fc26b013c241219c642095
)
[dnb/] => Array
(
[name] => Music/dnb/
[time] => 1296576896
[size] => 0
[hash] => d41d8cd98f00b204e9800998ecf8427e
)
[dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3] => Array
(
[name] => dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
[time] => 1296577218
[size] => 11782889
[hash] => 372e32ad1aff44061b65f5a76e7e805c
)
[Music/dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3] => Array
(
[name] => dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3
[time] => 1296577357
[size] => 8260946
[hash] => 7fda7e838192f5c362f71ffff300a8c3
)
[dnb/Abort_Delta Heavy_192.mp3] => Array
(
[name] => dnb/Abort_Delta Heavy_192.mp3
[time] => 1296577451
[size] => 8080602
[hash] => bb71d713fd77746cd7debb39407ba88f
)
здесь вывод.
TheBeautifulSouth/2-15 One Last Love Song.m4anum2
TheBeautifulSouth/2-16 Mirror.m4anum2
TheBeautifulSouth/2-17 One God.m4anum2
TheBeautifulSouth/2-18 Blackbird On the Wire (Radio Ed.m4anum2
dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3num2
dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3num2
dnb/Better Place_Dub Zero_192.mp3num2
dnb/Body_Shot_Tantrum_Desire_192.mp3num2
Я пытаюсь поместить это в структуру меню следующим образом.
<ul>
<li>
<ul>
TheBeautifulSouth
<li>2-15 One Last Love Song.m4anum2</li>
<li>2-16 Mirror.m4anum2</li>
<li>2-17 One God.m4anum2</li>
<li>2-18 Blackbird On the Wire (Radio Ed.m4anum2</li>
</ul>
</li>
<li>
<ul>
dnb
<li>03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3num2</li>
<li>21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3num2</li>
<li>Better Place_Dub Zero_192.mp3num2</li>
<li>Body_Shot_Tantrum_Desire_192.mp3num2</li>
</ul>
</li>
Я пытаюсь использовать функцию php strstr, но не могу понять это. Вот мой код:
<ul>
<li>list
<ul>
<?php foreach ($bucket_contents as $file){
$fname = $file['name'];
$list = strstr($fname, '/', true); ?>
<li><?php echo $list; ?></li>
<?php } ?>
</ul>
</li>
</ul>