I'm using PHP. I have an array which has 1-256 items. Here is an example:
$arr[] = "(1.) Ben";
$arr[] = "Albert";
$arr[] = "Bill";
$arr[] = "(2.) Paul";
$arr[] = "(5.) Martin";
$arr[] = "(12.) Mike";
$arr[] = "(20.) John";
Question 1:
I would like to order the items alphabetically by names. So, the result should be this:
Albert
(1.) Ben
Bill
(20.) John
(5.) Martin
(12.) Mike
(2.) Paul
Question 2:
I also would like to order the items by 1) numbers and 2) names like this way:
(1.) Ben
(2.) Paul
(5.) Martin
(12.) Mike
(20.) John
Albert
Bill
How could I do the job with PHP?