Skip to content

Instantly share code, notes, and snippets.

@blambi
Created March 8, 2012 10:12
Show Gist options
  • Save blambi/2000117 to your computer and use it in GitHub Desktop.
Save blambi/2000117 to your computer and use it in GitHub Desktop.
fun fun fun
foreach($facets as $gid => $value)
{
usort($facets[$gid]['items'],
function($a, $b) {
return strcmp($a['title'], $b['title']);
}
);
$facets[$gid]['items'] = array_map( function($x) { return $x['link']; }, $facets[$gid]['items']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment