Skip to content

Instantly share code, notes, and snippets.

@yurivictor
Created March 21, 2012 20:34
Show Gist options
  • Save yurivictor/2152615 to your computer and use it in GitHub Desktop.
Save yurivictor/2152615 to your computer and use it in GitHub Desktop.
ONA12 random session sorter
<?php
$json_url = 'ona12.json';
$json_string = file_get_contents($json_url);
$json_decoded = json_decode($json_string, true);
$items = $json_decoded;
$items_random = shuffle($items);
$i = 1;
echo '<h1>ONA12 sessions sorted randomly</h1>';
echo '<a class="large button nice" href="http://www.reddit.com/r/digitaljournalism">Full list</a>';
echo '<ul>';
foreach($items as $value) {
echo '<li><a href="'.$value['ideaURL'].'"><span>'.$i.'</span> ';
echo $value['sessionTitle'];
echo '</a></li>';
$i++;
}
echo '</ul>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment