Created
March 21, 2012 20:34
-
-
Save yurivictor/2152615 to your computer and use it in GitHub Desktop.
ONA12 random session sorter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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