Now Playing
"; echo "Index array\n"; print_r($index); echo "\nVals array\n"; print_r($vals); echo "\n\n"; } if ( $vals[ $index["NOW_PLAYING"][0] ]["attributes"]["PLAYING"] == 1 ) { foreach ( $index["TITLE"] as $i => $j ) { $title = $vals[ $index["TITLE"][$i] ]["value"]; if ( strlen( $title ) > 0 ) { $artist = $vals[ $index["ARTIST"][$i] ]["value"]; $album = $vals[ $index["ALBUM"][$i] ]["value"]; $genre = $vals[ $index["GENRE"][$i] ]["value"]; $kind = $vals[ $index["KIND"][$i] ]["value"]; $track = $vals[ $index["TRACK"][$i] ]["value"]; $year = $vals[$index["YEAR"][$i] ]["value"]; $comments = $vals[ $index["COMMENTS"][$i] ]["value"]; $time = $vals[ $index["TIME"][$i] ]["value"]; $bitrate = $vals[ $index["BITRATE"][$i] ]["value"]; $playcount = $vals[ $index["PLAYCOUNT"][$i] ]["value"]; $compilation = $vals[ $index["COMPILATION"][$i] ]["value"]; $urlamazon = $vals[ $index["URLAMAZON"][$i] ]["value"]; $urlapple = $vals[ $index["URLAPPLE"][$i] ]["value"]; $imagesmallurl = $vals[ $index["IMAGESMALL"][$i] ]["value"]; $imageurl = $vals[ $index["IMAGE"][$i] ]["value"]; $imagelargeurl = $vals[ $index["IMAGELARGE"][$i] ]["value"]; $composer = $vals[ $index["COMPOSER"][$i] ]["value"]; $grouping = $vals[ $index["GROUPING"][$i] ]["value"]; $file = $vals[ $index["FILE"][$i] ]["value"]; $urlsource = $vals[ $index["URLSOURCE"][$i] ]["value"]; echo "Now Playing is " . $title . " by " . $artist; } } } else { echo "Now Playing is stopped."; } } ?>