I have an array with these values:
1...
2...
3...
...
9. Built-in Functions
9.1. String
9.2. Arithmetic
9.3. Variable
9.4. Array
9.5. Date & Time
9.6. Object
9.7. Database
9.8. Session
9.9. Directory
9.10. Other
And I want them to be displayed in this order (like numeric).
But, sorting it with sort() or asort(), using both SORT_NUMERIC and SORT_STRING flags, I get the same result:
1...
2...
3...
...
9. Built-in Functions
9.1. String
9.10. Other
9.2. Arithmetic
9.3. Variable
9.4. Array
9.5. Date & Time
9.6. Object
9.7. Database
9.8. Session
9.9. Directory
*see the 9.10
And using the SORT_NATURAL the parent items are placed AFTER the children:
1...
2...
3...
...
9.1. String
9.2. Arithmetic
9.3. Variable
9.4. Array
9.5. Date & Time
9.6. Object
9.7. Database
9.8. Session
9.9. Directory
9.10. Other
9. Built-in Functions
How could I get the proper sorting?
*edited to include the parent items properly