people_findByUsername($UserID); // Get the friendly URL of the user's photos $photos_url = $f->urls_getUserPhotos($person['id']); // Get the user's first $NumberOfPhotos public photos $photos = $f->people_getPublicPhotos($person['id'], NULL, $NumberOfPhotos); // Loop through the photos and output the html $i = 0; shuffle($photos['photo']); foreach ((array)$photos['photo'] as $photo) { echo ""; echo "$photo[title]"; echo ""; $i++; // If it reaches the 8th photo, insert a line break if ($i % 8 == 0) { echo "
\n"; } } } ?>