function flickr_sortByPopularity in Flickr 7
Puts an array in descending order on the used key.
Call this function with e.g. 'usort($photos, 'flickr_sortByPopularity')'. See http://stackoverflow.com/a/2699159.
1 string reference to 'flickr_sortByPopularity'
- flickr_album in ./
flickr.inc - Render multiple photos as an album.
File
- ./
flickr.inc, line 1716 - The Flickr API functions.
Code
function flickr_sortByPopularity($a, $b) {
return $b['views'] > $a['views'];
}