Now, I assume that m3u parser puts out an array.
I have a bit of code that lists all the mp3 files in a directory to an
array called $allresults, then this next bit of code reads through the
array and generates the jplayer playlist.
Was that the sort of thing you meant?
if (isset($allresults))
{
foreach ($allresults as $key => $val) {
$tracknumber = $key+1;
echo ",{name:\"Track $tracknumber " . trim($buffer[$key]) .
"\",mp3:\"$TNMusicWebdir$mp3filename[$key]\",ogg:\"$TNMusicWebdir
$mp3filename[$key]\"}";
On May 26, 9:19 am, Jonathan2 <digitalto...@gmail.com> wrote:
> Bear in mind that I'm a coding newbie, try something like this:http://www.phpclasses.org/package/5046-PHP-Parse-M3U-playlist-files.h...
which is because my playlist has an intro file.
So you just need to ensure that the start looks like
echo "{name:\"Track $tracknumber " . trim($buffer[$key]) .
etc
but that it also has commas between playlist items, except for the
last one.
On May 26, 7:19 am, Jonathan2 <digitalto...@gmail.com> wrote:
> Bear in mind that I'm a coding newbie, try something like this:http://www.phpclasses.org/package/5046-PHP-Parse-M3U-playlist-files.h...