I want to sort one column fetched from mysql DB, and stored in an array. After fetching I am doing below steps.
- DB Fetching fields array in row format. ->Field1, Field2, Field3, Field4, Field5
- From that fields array One columns data [Field3], swapping string keywords.
eg.
AB013, DB131, RS001
should become:
013AB, 131DB, 001RS
Now I want to sort above value in new string format like-> 001RS, 013AB, 131DB
Its not like that, fix number for swapping string. To split and join string again there is a dynamic value which allow fetch data string to split that string from the given character position and then sort it again with new name.