Skip to content

Instantly share code, notes, and snippets.

@jjsty1e
Created June 14, 2017 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjsty1e/79b0b210b7bc41619326ebbd70d5b4ce to your computer and use it in GitHub Desktop.
Save jjsty1e/79b0b210b7bc41619326ebbd70d5b4ce to your computer and use it in GitHub Desktop.
my sort
<?Php
$len = count($arr);
for ($i = 0; $i < $len; $i++) {
for ($j = 0; $j < $i; $j++) {
if ($arr[$i] < $arr[$j]) {
$temp = $arr[$i];
$arr[$i] = $arr[$j];
$arr[$j] = $temp;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment