Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
24ff6f6e
Commit
24ff6f6e
authored
Jan 12, 2016
by
Carsten Rose
Browse files
Sort.php: Helper Class to sort. Initially created
parent
54e8e69d
Changes
1
Hide whitespace changes
Inline
Side-by-side
qfq/helper/Sort.php
0 → 100644
View file @
24ff6f6e
<?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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment