i have tried both ksort and asort but in both cases all always shows at bottom..
but i want to display array of index 'all' at top then numeric fields should be displayed.
Actually i am adding that key manually.
$result['all'] = new stdClass();
$result['all']->DisciplinaryAction = 'All';
$result['all']->DisciplinaryActionID = 0;
i tried ksort($result)
and also tried asort($result)
but in both cases text/string always arranged to bottom..
Array
(
[0] => stdClass Object
(
[DisciplinaryAction] => counseling
[DisciplinaryActionID] => 1
)
[1] => stdClass Object
(
[DisciplinaryAction] => verbal warning
[DisciplinaryActionID] => 2
)
[2] => stdClass Object
(
[DisciplinaryAction] => written warning
[DisciplinaryActionID] => 3
)
[3] => stdClass Object
(
[DisciplinaryAction] => suspension
[DisciplinaryActionID] => 4
)
[4] => stdClass Object
(
[DisciplinaryAction] => termination
[DisciplinaryActionID] => 5
)
[all] => stdClass Object
(
[DisciplinaryAction] => All
[DisciplinaryActionID] => 0
)
)