Sorting an array in PHP based on different values
- by Jimbo
I have an array whose elements are name, reversed_name, first_initial and second_initial. A typical row is "Aaron Smith", "Smith, Aaron", "a", "s". Each row in the array has a first_initial or second_initial value of "a".
I need to display the rows alphabetically but based on the "a" part, so that either the name or reversed_name will be…