X-Git-Url: https://git.jacobcasper.com/?p=Marketplaylister.git;a=blobdiff_plain;f=mpfuncs.php;fp=mpfuncs.php;h=a35c89f3b61a4810751542f96836e4be20672b9c;hp=0000000000000000000000000000000000000000;hb=bed05b1a3c4b40cb71564fbebb2cb41242163dbd;hpb=7d1597b735679b00f4d2ab735b55648f886337b2 diff --git a/mpfuncs.php b/mpfuncs.php new file mode 100644 index 0000000..a35c89f --- /dev/null +++ b/mpfuncs.php @@ -0,0 +1,26 @@ +hasAttribute('class') && $div->getAttribute('class') === 'episode-music') { + if (!$numDays) { + break; + } + $songs = []; + foreach ($div->childNodes as $row) { + $children = $row->childNodes[0]->childNodes; + $songs[] = [ + 'title' => $children[0]->nodeValue, + 'artist' => $children[1]->nodeValue + ]; + } + $numDays--; + $episodePage[] = $songs; + } + + } + + return $episodePage; + + } \ No newline at end of file