I have the following array:
$name_arr = array('raj','raj','ganesh','rahul','ganesh','mayur','raj','rahul');
I want to sort it like this:
$final_arr = array('raj','raj','raj','ganesh','ganesh','rahul','rahul','mayur');
How can I achieve it?
See Question&Answers more detail:os