Skip to content

Instantly share code, notes, and snippets.

@muhfaris
Created April 18, 2017 00:50
Show Gist options
  • Save muhfaris/097c87a9334a79382c2ac6f0e08eca08 to your computer and use it in GitHub Desktop.
Save muhfaris/097c87a9334a79382c2ac6f0e08eca08 to your computer and use it in GitHub Desktop.
Sort data
<?php
for ($i=1;$i<=sizeof($dateListGen_2)-1;$i++){
for ($j=$i;$j<sizeof($dateListGen_2);$j++){
if ($dateListGen_2[$i-1]>$dateListGen_2[$j]){
$temp = $dateListGen_2[$i-1];
$dateListGen_2[$i-1] = $dateListGen_2[$j];
$dateListGen_2[$j] = $temp;
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment