Reputation: 1115
I'm having trouble sorting an array in PHP and I'm having some trouble with the basic sort() routine.
For example,
$arr = array("J1", "N1", "J10", "J2");
When using the sort routine, my output is: J1, J10, J2, N1.
My desired output is: J1, J2, J10, N1.
Does anyone know a more suited sorting algorithm for this type of problem?
Upvotes: 2
Views: 90