<?php
$playlists = $db->playlists;
$myList = $playlists->findOne(array('username' => 'me'));
// プレイリストの各曲を取得します
foreach ($myList['songlist'] as $songRef) {
$song = $playlists->getDBRef($songRef);
echo $song['title'] . "\n";
}
?>
Dazed and Confused
Ma na ma na
Bohemian Rhapsody
上の例で、それぞれの $songRef の中身は次のような形式になります。
Array
(
[$ref] => songs
[$id] => 49902cde5162504500b45c2c
)