Commit 24ff6f6e authored by Carsten  Rose's avatar Carsten Rose
Browse files

Sort.php: Helper Class to sort. Initially created

parent 54e8e69d
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 1/12/16
* Time: 8:53 AM
*/
namespace qfq\helper;
class Sort {
/**
* @param array $a
*/
public static function byKey(array &$a) {
$result = array();
$keys = array_keys($a);
sort($keys);
foreach ($keys as $key) {
$result[$key] = $a[$key];
}
$a = $result;
return;
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment