| @@ 257-261 (lines=5) @@ | ||
| 254 | for ($i = 0; $i < $arrayCount; $i++) { |
|
| 255 | for ($y = ($i + 1); $y < $arrayCount; $y++) { |
|
| 256 | if ($order == 'asc') { |
|
| 257 | if ($array[$i][$sort_by] < $array[$y][$sort_by]) { |
|
| 258 | $c = $array[$i]; |
|
| 259 | $array[$i] = $array[$y]; |
|
| 260 | $array[$y] = $c; |
|
| 261 | } |
|
| 262 | } else { |
|
| 263 | if ($array[$i][$sort_by] > $array[$y][$sort_by]) { |
|
| 264 | $c = $array[$i]; |
|
| @@ 262-268 (lines=7) @@ | ||
| 259 | $array[$i] = $array[$y]; |
|
| 260 | $array[$y] = $c; |
|
| 261 | } |
|
| 262 | } else { |
|
| 263 | if ($array[$i][$sort_by] > $array[$y][$sort_by]) { |
|
| 264 | $c = $array[$i]; |
|
| 265 | $array[$i] = $array[$y]; |
|
| 266 | $array[$y] = $c; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | } |
|
| 270 | } |
|
| 271 | return $array; |
|