Permalink
Browse files

Sort the Speed Dials slots by position

  • Loading branch information...
1 parent 25a411b commit 4b872b10304c1f7b4e6e12738e1a52c1f43f336f @estebanm estebanm committed Nov 25, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 index.php
View
@@ -112,6 +112,12 @@
// print out the speeddial data
$json_data_array = json_decode($response_info,true);
+ uasort($json_data_array, function ($a, $b) {
+ $apos = $a["id"];
+ $bpos = $b["id"];
+ if ($apos == $bpos) return 0;
+ return ($bpos > $apos) ? -1 : 1;
+ });
echo("<html>");
echo("<head><title>Opera Link SpeedDial PHP demo</title>");

0 comments on commit 4b872b1

Please sign in to comment.