Permalink
Browse files

Added streamlined example

  • Loading branch information...
1 parent 1c608d4 commit babc63d9971f32e4fa067270914738c59787a918 @martinbean committed Sep 5, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 examples.php
View
@@ -57,4 +57,10 @@
# echo '<a href="'.$shoturl.'"><img src="'.$image.'" alt="'.$title.'" title="'.$title.'" /></a>';
}
++$i;
+}
+
+# Streamlined version of the above example if we wanted two shots only...
+$shots = $player->shots(array('per_page' => 2));
+foreach ($shots->shots as $shot) {
+ echo sprintf('<a href="%s"><img src="%s" alt="%s" /></a>', $shot->url, $shot->image_teaser_url, $shot->title);
}

0 comments on commit babc63d

Please sign in to comment.